Re: [PERFORM] slow subselects

2007-02-20 Thread Marko Niinimaki
Many thanks! Ismo's reply solved the problem, and Tom's reply solved another one. Marko Ismo Tuononen wrote: select studentid,max(score) from studentprofile group by studentid; On 20/02/07, Tom Lane <[EMAIL PROTECTED]> wrote: The optimal index for this would be on studentprofile(studentid,s

Re: [PERFORM] SELECT performance problem

2007-02-20 Thread Dave Dutcher
Did you run ANALYZE on your data after importing it into 8.2.3? Is there an index on the seqfil column? If so, you should post the output of EXPLAIN ANALYZE from both systems if possible. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Glenn S

Re: [PERFORM] SELECT performance problem

2007-02-20 Thread Jeff Frost
On Tue, 20 Feb 2007, Glenn Sullivan wrote: I am updating from 7.4.5 to 8.2.3. I have noticed a significant slowdown in simple searches such as "select filename from vnmr_data where seqfil = 'sems';" This returns 12 rows out of 1 million items in the table. On 7.4.5, this takes about 1.5 seco

[PERFORM] SELECT performance problem

2007-02-20 Thread Glenn Sullivan
I am updating from 7.4.5 to 8.2.3. I have noticed a significant slowdown in simple searches such as "select filename from vnmr_data where seqfil = 'sems';" This returns 12 rows out of 1 million items in the table. On 7.4.5, this takes about 1.5 seconds. On 8.2.3, it is taking about 9 seconds

Re: [PERFORM] Query Optimization

2007-02-20 Thread Jim C. Nasby
It's not necessarily the join order that's an issue; it could also be due to the merge join that it does in the first case. I've also run into situations where the cost estimate for a merge join is way off the mark. Rather than forcing the join order, you might try setting enable_mergejoin=false.