Bruce Momjian <[EMAIL PROTECTED]> writes: > Do we know in the optimizer whether we will be needing cheapest startup > or not?
No. Higher levels might want either. > Is the middle one kept because the optimizer has to mix the startup plus > some percentage of the total cost for queries using LIMIT? Right. There are potentially some ranges of LIMIT for which it could win, I believe. Maybe with some math you could prove there is no range in which the other two don't dominate it, but I suspect the extra logic would slow down add_path more than it's worth. 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