diff options
author | drh <> | 2024-08-16 18:51:46 +0000 |
---|---|---|
committer | drh <> | 2024-08-16 18:51:46 +0000 |
commit | 65a46af7ae11ffe430519dec1aa8aee9c9281376 (patch) | |
tree | 11f7e25266f018b0e2dbded1f36998f0370e6e3c /src/sqliteInt.h | |
parent | b8123415b2952793279bad794680c14e191d7ca5 (diff) | |
parent | 2ed4f5016a591b5aaabe4a80fc073faab4ad907d (diff) | |
download | sqlite-65a46af7ae11ffe430519dec1aa8aee9c9281376.tar.gz sqlite-65a46af7ae11ffe430519dec1aa8aee9c9281376.zip |
If a subquery has an ORDER BY clause and that ordering is helpfile in
satisfying the ORDER BY or GROUP BY of the outer query without doing an
extra sort, then omit or reduce the sort in the outer query. Call
this the "order-by-subquery optimization".
FossilOrigin-Name: 7a0cdc7edb704a88a77b748cd28f6e00c49849cc2c1af838b95b34232ecc21f9
Diffstat (limited to 'src/sqliteInt.h')
-rw-r--r-- | src/sqliteInt.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sqliteInt.h b/src/sqliteInt.h index dca5bb150..ebd0f01b2 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -1927,6 +1927,7 @@ struct sqlite3 { #define SQLITE_Coroutines 0x02000000 /* Co-routines for subqueries */ #define SQLITE_NullUnusedCols 0x04000000 /* NULL unused columns in subqueries */ #define SQLITE_OnePass 0x08000000 /* Single-pass DELETE and UPDATE */ +#define SQLITE_OrderBySubq 0x10000000 /* ORDER BY in subquery helps outer */ #define SQLITE_AllOpts 0xffffffff /* All optimizations */ /* |