> 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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to