Taral <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly