1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

If an "INSERT INTO ... SELECT" can use the xfer optimization, pass the OPFLAG_BULKCSR hint to btree cursors used to update indices. This results in a tighter key packing.

FossilOrigin-Name: 087af29ee2e1572f8668dd0152a14d7f9796a530
This commit is contained in:
dan
2013-10-04 18:17:18 +00:00
parent 5f33f37580
commit 5988572876
3 changed files with 9 additions and 8 deletions

View File

@@ -1900,6 +1900,7 @@ static int xferOptimization(
pKey = sqlite3IndexKeyinfo(pParse, pDestIdx);
sqlite3VdbeAddOp4(v, OP_OpenWrite, iDest, pDestIdx->tnum, iDbDest,
(char*)pKey, P4_KEYINFO_HANDOFF);
sqlite3VdbeChangeP5(v, OPFLAG_BULKCSR);
VdbeComment((v, "%s", pDestIdx->zName));
addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
sqlite3VdbeAddOp2(v, OP_RowKey, iSrc, regData);