[tarantool-patches] Re: [PATCH] sql: xfer optimization issue
hollow653 at gmail.com
Mon Jul 30 21:33:55 MSK 2018
вс, 29 июл. 2018 г. в 18:16, Alexander Turenko <
alexander.turenko at tarantool.org>:
> On Sun, Jul 29, 2018 at 02:23:30PM +0300, n.pettik wrote:
> > > 1. Not actual due to 2, but it would be better to use
> > > `pOp->p5 &= ~OPFLAG_XFER_OPT` to drop just that flag.
> > > 2. It is counter-intuitive, IMHO, to change operation flags during
> > > that operation. So, said above, vote to move it to OP_OpenWrite.
> > Well, actually moving it to OP_OpenWrite seems to be bad idea.
> > Even if code for xFer optimisation is generated, it
> > still might not be executed. The only opcode ensuring xFer is
> > under processing - OP_RowData.
> We have separate OpenWrite opcodes in xfer and regular insert code. We
> open destination space curson always (to determine whether the space is
> empty), but we can set the flag when open source space cursor. But this
> will forbid to check source space for emptiness in xfer code or will
> require to 'workaround' it using two cursors.
> By the way, I observed that the following code is dead:
> > if (emptySrcTest)
> > sqlite3VdbeJumpHere(v, emptySrcTest);
> WBR, Alexander Turenko.
I'm not sured if changing p5 in OP_OpenWrite is a good idea since
1) Even if p5 isn't used while xfer is processed it's reserved and
there are no free parameters.
2) Who knows, probably we will need p5 for something in future.
3) AFAIK OP_OpenWrite is a legacy opcode and probably gonna be
4) For me it's more counter-intuitive to put incrementation in
opcode that barely related to xfer optimization idea.
5) Do CPU cycles matter for debugging purpose only global variable?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tarantool-patches