Select query ignores index on large table

From: Michael Kemanetzis <michael(dot)kemanetzis(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Select query ignores index on large table
Date: 2011-01-27 14:04:02
Message-ID: AANLkTikG=_FM+taw_XqNiS4OhMJJjpsxP-fwG_6ejf7R@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello, I'm experiencing a strange behavior running a simple select query on
a table that has about 12 million rows. Specifically, changing the "LIMIT"
value seems to change the execution plan but the result in one of the cases
is unjustifiably slow, as if it ignores all indexes.

The table structure, the queries used and the results are here:
http://pastebin.com/fn36BuKs

Is there anything I can do to improve the speed of this query?

Are there any configuration settings that I should change?

Thanks,
Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-01-27 14:12:45 Re: Select query ignores index on large table
Previous Message Girts Laudaks 2011-01-27 12:52:58 Dumpall without OID