Re: No merge sort?
От | Tom Lane |
---|---|
Тема | Re: No merge sort? |
Дата | |
Msg-id | 26094.1047699810@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: No merge sort? (Taral <taral@taral.net>) |
Ответы |
Re: No merge sort?
|
Список | pgsql-hackers |
Taral <taral@taral.net> writes: > On Thu, Mar 13, 2003 at 10:30:27PM -0500, Tom Lane wrote: >> The idea is you look at the index to make a list of main-table tuple >> positions you are interested in, which you represent compactly as a >> compressed bitmap. [snip] > And it loses bigtime in the case of LIMIT. If the unlimited query > returns 4,000 records and I only want 20, you're retrieving 200x too > much data from disk. Sure. That's why we have a planner that distinguishes between startup cost and total cost, and interpolates when a LIMIT is involved. But if this mergesort idea only helps for small-limit cases, that's another restriction on its scope of usefulness... regards, tom lane
В списке pgsql-hackers по дате отправления: