Re: [PERFORM] [SQL] ORDER BY Optimization

2005-05-07 Thread Tom Lane
[ cc list limited to -performance ] Derek Buttineau|Compu-SOLVE <[EMAIL PROTECTED]> writes: >> It seems to me a merge join might be more appropriate here than a >> nestloop. After some experimentation, I don't seem to be able to get the planner to generate a mergejoin based on a backwards index s

Re: [PERFORM] [SQL] ORDER BY Optimization

2005-05-06 Thread Derek Buttineau|Compu-SOLVE
Thanks for the response :) That's 50-ish ms versus 80-odd seconds. It seems to me a merge join might be more appropriate here than a nestloop. What's your work_mem set at? Off-the-cuff numbers show the dataset weighing in the sub-ten mbyte range. Provided it's not already at least that big, and yo

Re: [PERFORM] [SQL] ORDER BY Optimization

2005-05-06 Thread Rosser Schwarz
while you weren't looking, Derek Buttineau|Compu-SOLVE wrote: > I'm hoping this is the right place to send this. The PostgreSQL Performance list, pgsql-performance@postgresql.org would be more appropriate. I'm copying my followup there, as well. As for your query, almost all the time is actually