Re: [PERFORM] SQL select query becomes slow when using limit (with no offset)

2009-08-10 Thread Devin Ben-Hur
Robert Haas wrote: On Mon, Aug 10, 2009 at 11:19 AM, Kevin Grittner wrote: (2) Somehow use effective_cache_size in combination with some sort of current activity metrics to dynamically adjust random access costs. (I know, that one's total hand-waving, but it seems to have some possibility of b

Re: [PERFORM] SQL select query becomes slow when using limit (with no offset)

2009-08-10 Thread Robert Haas
On Mon, Aug 10, 2009 at 11:19 AM, Kevin Grittner wrote: > Robert Haas wrote: > >> Just handling better the case where we pick a straight nested loop >> rather than a hash join would help a lot of people.  Some basic >> conservatism about the number of outer rows would be useful here (in >> particu

Re: [PERFORM] SQL select query becomes slow when using limit (with no offset)

2009-08-10 Thread Kevin Grittner
Robert Haas wrote: > Just handling better the case where we pick a straight nested loop > rather than a hash join would help a lot of people. Some basic > conservatism about the number of outer rows would be useful here (in > particular, we should probably assume that there will be at least 2

Re: [PERFORM] Bottleneck?

2009-08-10 Thread Robert Haas
On Mon, Aug 10, 2009 at 2:22 AM, Ip Wing Kin John wrote: > Hi Scott, > > Thanks for you suggestion. I have follow your suggestion by disable > nestloop and have a substantial improvement. Takes 51s now. I have > attached the new query plan in another file. > > What I want to ask is, is there any ot

Re: [PERFORM] Bottleneck?

2009-08-10 Thread Scott Marlowe
On Mon, Aug 10, 2009 at 12:22 AM, Ip Wing Kin John wrote: > Hi Scott, > > Thanks for you suggestion. I have follow your suggestion by disable > nestloop and have a substantial improvement. Takes 51s now. I have > attached the new query plan in another file. > > What I want to ask is, is there any o