Re: Performance With Joins on Large Tables - Mailing list pgsql-performance

From Marcin Mank
Subject Re: Performance With Joins on Large Tables
Date
Msg-id 031701c6d764$05b0c490$0c67a8c0@maniek
Whole thread Raw
In response to Performance With Joins on Large Tables  ("Joshua Marsh" <icub3d@gmail.com>)
List pgsql-performance
> Is there anything I'm missing that is preventing it from using the index?
It
> just seems weird to me that other joins like this work fine and fast
> with indexes,
> but this one won't.


Did You consider clustering both tables on the dsiacctno index?

I just checked that for a 4M rows table even with enable_seqscan=on and
default *page_cost on PG 8.1.4 an index scan is being chosen for
select * from table order by serial_pkey_field


This is essentially the question in Your case - sort it, or get it sorted
via the index at the expense of more random IO.

I think clustering should work for You, but I am no expert, check with
others.

Greetings
Marcin


pgsql-performance by date:

Previous
From: "Bucky Jordan"
Date:
Subject: Query Progress (was: Performance With Joins on Large Tables)
Next
From: "Joshua Marsh"
Date:
Subject: Re: Query Progress (was: Performance With Joins on Large Tables)