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

Provide hints to the btree layer during the creation of transient tables

when it is possible for those tables to use a hash rather than a binary tree.
No use is current made of those hints, though assert() statement verify
their accuracy.

FossilOrigin-Name: 4fead8e714c7e50a9d246467e62bc846ef6180a0
This commit is contained in:
drh
2010-08-30 22:15:45 +00:00
parent c223b8f1a8
commit d4187c716c
10 changed files with 79 additions and 38 deletions

View File

@@ -1503,6 +1503,7 @@ static int multiSelect(
if( dest.eDest==SRT_EphemTab ){
assert( p->pEList );
sqlite3VdbeAddOp2(v, OP_OpenEphemeral, dest.iParm, p->pEList->nExpr);
sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
dest.eDest = SRT_Table;
}
@@ -3769,6 +3770,7 @@ int sqlite3Select(
pKeyInfo = keyInfoFromExprList(pParse, p->pEList);
sqlite3VdbeAddOp4(v, OP_OpenEphemeral, distinct, 0, 0,
(char*)pKeyInfo, P4_KEYINFO_HANDOFF);
sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
}else{
distinct = -1;
}