1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-06 15:49:35 +03:00

Use the estimated number of rows computed for subqueries in the cost

computations for outer queries.

FossilOrigin-Name: 56bbc539246a6dc9f1ae1edb898db7a4f6f6d322
This commit is contained in:
drh
2010-11-16 02:49:15 +00:00
parent 04098e6085
commit 95aa47b10a
7 changed files with 82 additions and 19 deletions

View File

@@ -1947,6 +1947,7 @@ struct WhereInfo {
int nLevel; /* Number of nested loop */
struct WhereClause *pWC; /* Decomposition of the WHERE clause */
double savedNQueryLoop; /* pParse->nQueryLoop outside the WHERE loop */
double nRowOut; /* Estimated number of output rows */
WhereLevel a[1]; /* Information about each nest loop in WHERE */
};
@@ -2022,6 +2023,7 @@ struct Select {
Expr *pOffset; /* OFFSET expression. NULL means not used. */
int iLimit, iOffset; /* Memory registers holding LIMIT & OFFSET counters */
int addrOpenEphm[3]; /* OP_OpenEphem opcodes related to this select */
double nSelectRow; /* Estimated number of result rows */
};
/*