On Sunday, December 6, 2020, 孙冰 <
subi.the.dream.walker@gmail.com> wrote:
The skipped rows by an OFFSET
clause have to be computed nevertheless. I am wondering if there could be any chance to improve, since the computation is on the entire rows rather than on the criterial columns.
[...]
I don't understand the postgresql internal, but I suspect such a change may introduce significant work on the planner and executor. From my point view, skipping everything (or expensive ones) except the criteria in the target list would greatly improve the usability of OFFSET
, and it is definitely worth the effort.
Given that one can write this with a subquery without much difficulty i’m doubtful that effort spent in this area is going to be particularly valuable.
David J.