On Fri, Jul 08, 2005 at 10:06:23AM -0700, Adam Pritchard wrote: > Why aren't two single-column indexes used in a two-column ORDER BY > clause? And is there some way to work around this? > > For example: > CREATE TABLE t ( c1 INT, c2 INT ); > CREATE INDEX c1_idx ON t(c2); ^^^^ > CREATE INDEX c2_idx ON t(c2); Not that it changes anything, but I assume you meant to create the first index on c1. I'll defer an explanation of the sequential scan behavior to somebody who understands the planner better. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend