mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-21 09:00:59 +03:00
The idea of coding IN operator with a short list on the RHS as an OR expression
turns out to be helpful. If the list is of length 1 or 2, the OR expression is very slightly faster, but the ephemeral table approach is clearly better for all list lengths greater than 2. Better to keep the code simple. FossilOrigin-Name: e13175d3579e1045165bab091b3b28951d691704
This commit is contained in:
@@ -3598,13 +3598,11 @@ const char *sqlite3JournalModename(int);
|
||||
#define IN_INDEX_EPH 2 /* Search an ephemeral b-tree */
|
||||
#define IN_INDEX_INDEX_ASC 3 /* Existing index ASCENDING */
|
||||
#define IN_INDEX_INDEX_DESC 4 /* Existing index DESCENDING */
|
||||
#define IN_INDEX_NOOP 5 /* No table available. Use comparisons */
|
||||
/*
|
||||
** Allowed flags for the 3rd parameter to sqlite3FindInIndex().
|
||||
*/
|
||||
#define IN_INDEX_NOOP_OK 0x0001 /* OK to return IN_INDEX_NOOP */
|
||||
#define IN_INDEX_MEMBERSHIP 0x0002 /* IN operator used for membership test */
|
||||
#define IN_INDEX_LOOP 0x0004 /* IN operator used as a loop */
|
||||
#define IN_INDEX_MEMBERSHIP 0x0001 /* IN operator used for membership test */
|
||||
#define IN_INDEX_LOOP 0x0002 /* IN operator used as a loop */
|
||||
int sqlite3FindInIndex(Parse *, Expr *, u32, int*);
|
||||
|
||||
#ifdef SQLITE_ENABLE_ATOMIC_WRITE
|
||||
|
||||
Reference in New Issue
Block a user