|From:||Andres Freund <andres(at)anarazel(dot)de>|
|Subject:||Changed SRF in targetlist handling|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
discussing executor performance with a number of people at pgcon,
several hackers - me included - complained about the additional
complexity, both code and runtime, required to handle SRFs in the target
One idea I circulated was to fix that by interjecting a special executor
node to process SRF containing targetlists (reusing Result possibly?).
That'd allow to remove the isDone argument from ExecEval*/ExecProject*
and get rid of ps_TupFromTlist which is fairly ugly.
Robert suggested - IIRC mentioning previous on-list discussion - to
instead rewrite targetlist SRFs into lateral joins. My gut feeling is
that that'd be a larger undertaking, with significant semantics changes.
If we accept bigger semantical changes, I'm inclined to instead just get
rid of targetlist SRFs in total; they're really weird and not needed
One issue with removing targetlist SRFs is that they're currently
considerably faster than SRFs in FROM:
tpch=# COPY (SELECT * FROM generate_series(1, 10000000)) TO '/dev/null';
Time: 2217.167 ms
tpch=# COPY (SELECT generate_series(1, 10000000)) TO '/dev/null';
Time: 1355.929 ms
I'm no tto concerned about that, and we could probably fixing by
removing forced materialization from the relevant code path.
|Next Message||Craig Ringer||2016-05-23 01:26:03||Re: Changed SRF in targetlist handling|
|Previous Message||Andres Freund||2016-05-23 00:32:22||Re: 9.4 failure on skink in _bt_newroot/XLogCheckBuffer|