Re: Ordered Partitioned Table Scans
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: David Rowley <david.rowley@2ndquadrant.com>,
Julien Rouhaud <rjuju123@gmail.com>, Antonin Houska <ah@cybertec.at>,
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-22T15:38:59Z
Lists: pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes: > I agree that the issue of mixing sorts at various points will make nonsense > of the startup cost/total cost results. Right. > I don't see LIMIT costing being broken as a reason to restrict this > optimization. I would ask that we allow improvements to the important use > case of ORDER BY/LIMIT, then spend time on making LIMIT work correctly. There's not time to reinvent LIMIT costing for v12. I'd be happy to see some work done on that in the future, and when it does get done, I'd be happy to see Append planning extended to allow this case. I just don't think it's wise to ship one without the other. regards, tom lane
Commits
-
Use Append rather than MergeAppend for scanning ordered partitions.
- 959d00e9dbe4 12.0 landed