diff options
author | dan <dan@noemail.net> | 2011-06-30 20:17:15 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2011-06-30 20:17:15 +0000 |
commit | 38cc40c216f080dd309cb47f9e7fc976ba4fc2dd (patch) | |
tree | 77ed4b83c7ca97cb585528db34b310288f62c94e /src/sqliteInt.h | |
parent | e1b4f0f177406df827af3ae30b2209cb7e682ef7 (diff) | |
download | sqlite-38cc40c216f080dd309cb47f9e7fc976ba4fc2dd.tar.gz sqlite-38cc40c216f080dd309cb47f9e7fc976ba4fc2dd.zip |
Experimental changes to improve optimization of DISTINCT queries.
FossilOrigin-Name: f7ba0219ef2f235543c258be736955d91ca5ecce
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index 09f64b793..c1e055b26 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1966,6 +1966,7 @@ struct WhereInfo { u16 wctrlFlags; /* Flags originally passed to sqlite3WhereBegin() */ u8 okOnePass; /* Ok to use one-pass algorithm for UPDATE or DELETE */ u8 untestedTerms; /* Not all WHERE terms resolved by outer loop */ + u8 eDistinct; SrcList *pTabList; /* List of tables in the join */ int iTop; /* The very beginning of the WHERE loop */ int iContinue; /* Jump here to continue with next record */ @@ -1977,6 +1978,9 @@ struct WhereInfo { WhereLevel a[1]; /* Information about each nest loop in WHERE */ }; +#define WHERE_DISTINCT_UNIQUE 1 +#define WHERE_DISTINCT_ORDERED 2 + /* ** A NameContext defines a context in which to resolve table and column ** names. The context consists of a list of tables (the pSrcList) field and @@ -2738,7 +2742,7 @@ Expr *sqlite3LimitWhere(Parse *, SrcList *, Expr *, ExprList *, Expr *, Expr *, #endif void sqlite3DeleteFrom(Parse*, SrcList*, Expr*); void sqlite3Update(Parse*, SrcList*, ExprList*, Expr*, int); -WhereInfo *sqlite3WhereBegin(Parse*, SrcList*, Expr*, ExprList**, u16); +WhereInfo *sqlite3WhereBegin(Parse*, SrcList*, Expr*, ExprList**,ExprList*,u16); void sqlite3WhereEnd(WhereInfo*); int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int); void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int); |