Nicholas Wieland <n...@nofeed.org> wrote:
 
> Hi, I've tried to post on stackoverflow, but nobody is apparently
> able to help me.
> I'm not going to repeat everything here, there's quite some code
> in there that is nicely formatted, but if this is a problem I can
> repost it in here.
 
> What seems incredibly strange to me is that postgres is not using
> the indexes I've set.
 
Help you with what?  You're getting 14,511 rows with 54 columns each
resulting from the join of three tables in 22 ms.  What would seem
like a reasonable time to you?
 
As I explained on SO yesterday, it can be faster to scan the table
and build up a RAM table for fast lookup than to grovel through an
index tens of thousands of times.  If you think the index would be
faster, test that by setting enable_seqscan and enable_hashjoin to
off on your connection and try the EXPLAIN ANALYZE.  I bet you get
the plan you thought you wanted, and I bet it's slower.
 
-Kevin

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to