From: Nikita Tatunov <hollow653@gmail.com>
To: alexander.turenko@tarantool.org
Cc: tarantool-patches@freelists.org, korablev@tarantool.org,
kyukhin@tarantool.org
Subject: [tarantool-patches] Re: [PATCH] sql: xfer optimization issue
Date: Mon, 16 Jul 2018 15:54:18 +0300 [thread overview]
Message-ID: <CAEi+_apzof1NH=W+k97SKP-7LFs1JwLwM7AHaW5t5-Qh61tq5g@mail.gmail.com> (raw)
In-Reply-To: <20180709155006.fwrikbznqk23ger5@tkn_work_nb>
[-- Attachment #1: Type: text/plain, Size: 3383 bytes --]
пн, 9 июл. 2018 г. в 18:50, Alexander Turenko <
alexander.turenko@tarantool.org>:
> Hi Nikita!
>
> Please, consider comments below.
>
> WBR, Alexander Turenko.
>
> > +test:do_execsql_test(
> > + "xfer-oprimization-1.8",
> > ...
> > +test:do_execsql_test(
> > + "xfer-oprimization-1.10",
> > ...
> > +test:do_execsql_test(
> > + "xfer-oprimization-1.12",
> > ...
> > +test:do_execsql_test(
> > + "xfer-oprimization-1.16",
> > +test:do_execsql_test(
> > + "xfer-oprimization-1.18",
>
> oprimization -> optimization
>
Is already fixed.
> It seems that review questions from the last Nikita email in the thread
> was not fixed or answered (at least some of them).
>
> > + sqlite3VdbeAddOp3(v, OP_OpenWrite, iSrc,
> > + pSrc->tnum, space_ptr_reg);
>
> Why do you open source space for write?
>
>
I changed it to 'vdbe_emit_open_cursor' which now is used everywhere for
both reading and writing (internally it uses 'OP_OpenWrite')
How your changes to xferCompatibleIndex and empty check enabling
> condition is motivated? It is hard to understand it without more
> detailed description.
>
>
We open cursors on PK for both tables, additional check that we have opened
'em on PK isn't redundunt.
What's about empty check enabling: I only want to add some cases where we
don't demand empty destination table for xferOptimization to be used. Thus
it will be used a little bit more frequently (it's faster than inserting
non-raw data for about 13%).
> ---
> EOF.
>
> On Thu, Jun 28, 2018 at 01:18:39PM +0300, Alexander Turenko wrote:
> > On Fri, May 04, 2018 at 12:54:30PM +0000, Hollow111 wrote:
> > > > @@ -1737,8 +1744,10 @@ xferOptimization(Parse * pParse, /*
> > > Parser context */
> > > > if (onError == ON_CONFLICT_ACTION_DEFAULT) {
> > > > if (pDest->iPKey >= 0)
> > > > onError = pDest->keyConf;
> > > > - if (onError == ON_CONFLICT_ACTION_DEFAULT)
> > > > + if (onError == ON_CONFLICT_ACTION_DEFAULT) {
> > > > onError = ON_CONFLICT_ACTION_ABORT;
> > > > + confl_action_default = 1;
> > > Why do you need this variable at all? I mean, DEFAULT always
> > > is an alias to ABORT, isn’t it?
> > > Yes, it is, but there's a little difference between directly
> specified
> > > ABORT for an
> > > insert stmt (INSERT OR ABORT) and just INSERT without any specified
> > > error action
> > > (ABORT specified by the internals). When you directly specify it
> ABORT
> > > is a higher priority
> > > action than in case there's a column with REPLACE error action.
> Thus we
> > > can even insert
> > > not in the empty destination table.
> >
> > If an user asks for ABORT explicitly we should make abort, I think.
> >
> > As I understood the extra variable appears due to the fact than we can
> > have per-column conflict clauses in CREATE TABLE and per-table clause
> > with INSERT OR ABORT. The latter should have precedence, I think.
> >
> > I don't sure whether something (behaviour? code?) should be different
> > from SQLite here in light of #2963 changes. Kirill, Nikita, can you
> > comment, please?
> >
> > WBR, Alexander Turenko.
> >
>
[-- Attachment #2: Type: text/html, Size: 4715 bytes --]
next prev parent reply other threads:[~2018-07-16 12:54 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 15:32 [tarantool-patches] " N.Tatunov
2018-04-18 16:33 ` [tarantool-patches] " Hollow111
2018-04-19 11:22 ` n.pettik
2018-04-19 15:36 ` Hollow111
2018-04-20 1:02 ` n.pettik
2018-04-20 15:09 ` Hollow111
2018-04-20 16:09 ` n.pettik
2018-04-20 17:59 ` Hollow111
2018-04-23 23:40 ` n.pettik
2018-04-27 15:45 ` Hollow111
2018-05-03 22:57 ` n.pettik
2018-05-04 12:54 ` Hollow111
2018-06-28 10:18 ` Alexander Turenko
2018-07-09 15:50 ` Alexander Turenko
2018-07-16 12:54 ` Nikita Tatunov [this message]
2018-07-16 13:06 ` n.pettik
2018-07-16 13:20 ` Nikita Tatunov
2018-07-16 18:37 ` Nikita Tatunov
2018-07-16 19:12 ` n.pettik
2018-07-16 21:27 ` Nikita Tatunov
2018-07-18 15:13 ` n.pettik
2018-07-18 20:18 ` Nikita Tatunov
2018-07-19 0:20 ` n.pettik
2018-07-19 17:26 ` Nikita Tatunov
2018-07-20 3:20 ` n.pettik
2018-07-20 11:56 ` Nikita Tatunov
2018-07-20 16:43 ` n.pettik
2018-07-20 16:58 ` Nikita Tatunov
2018-07-29 1:12 ` Alexander Turenko
2018-07-29 11:23 ` n.pettik
2018-07-29 15:16 ` Alexander Turenko
2018-07-30 18:33 ` Nikita Tatunov
2018-07-30 22:17 ` Alexander Turenko
2018-07-31 11:48 ` Nikita Tatunov
2018-07-31 13:29 ` Alexander Turenko
2018-07-31 17:04 ` Nikita Tatunov
2018-07-31 17:44 ` Alexander Turenko
2018-08-21 16:43 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEi+_apzof1NH=W+k97SKP-7LFs1JwLwM7AHaW5t5-Qh61tq5g@mail.gmail.com' \
--to=hollow653@gmail.com \
--cc=alexander.turenko@tarantool.org \
--cc=korablev@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH] sql: xfer optimization issue' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox