When run on 7.3.3, forcing an index scan by setting enable_seqscan=false, the query took 55 minutes to run. The index is about 660M in size, and the table is 1G. As I mentioned before, with table scans enabled, it bombs, running out of temporary space.
Man, I should wait a while before I send mails, because I keep having more to say!
Some good news here. Doing the same as above on 7.4beta2 took 29 minutes. Now, the 7.3.3 was on reiser and 7.4 on ext2, so take that as you will. 7.4's index selectivity estimate seems much better; 7.3.3's anticipated rows was ten times the actual; 7.4's is one half of the actual.
Ken
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend