diff options
author | drh <drh@noemail.net> | 2018-05-02 16:13:48 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-05-02 16:13:48 +0000 |
commit | 84a01debf9cd527e422d4bc3cbd0149b8a3b9e34 (patch) | |
tree | 08fe94a58dd29119f293ba565ff3fc1812e075b2 /src | |
parent | 03c3905f94be896702293266bee7cef9dcbae68e (diff) | |
download | sqlite-84a01debf9cd527e422d4bc3cbd0149b8a3b9e34.tar.gz sqlite-84a01debf9cd527e422d4bc3cbd0149b8a3b9e34.zip |
Improved EQP output for recursive CTEs and multi-value VALUES clauses.
FossilOrigin-Name: f2f525548c65f89f55cbe91da8a21512dedc6f7b68b58b7906d653e800a2963a
Diffstat (limited to 'src')
-rw-r--r-- | src/select.c | 5 | ||||
-rw-r--r-- | src/where.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/select.c b/src/select.c index d9b80f608..76dfef912 100644 --- a/src/select.c +++ b/src/select.c @@ -2290,6 +2290,8 @@ static void generateWithRecursiveQuery( /* Store the results of the setup-query in Queue. */ pSetup->pNext = 0; + ExplainQueryPlan((pParse, 1, "SETUP")); + ExplainQueryPlanSetId(pParse, pSetup); rc = sqlite3Select(pParse, pSetup, &destQueue); pSetup->pNext = p; if( rc ) goto end_of_recursive_query; @@ -2324,6 +2326,8 @@ static void generateWithRecursiveQuery( sqlite3ErrorMsg(pParse, "recursive aggregate queries not supported"); }else{ p->pPrior = 0; + ExplainQueryPlan((pParse, 1, "RECURSIVE STEP")); + ExplainQueryPlanSetId(pParse, p); sqlite3Select(pParse, p, &destQueue); assert( p->pPrior==0 ); p->pPrior = pSetup; @@ -2383,6 +2387,7 @@ static int multiSelectValues( p = p->pPrior; nRow++; }while(1); + ExplainQueryPlan((pParse, 0, "SCAN %d CONSTANT ROWS", nRow)); while( p ){ pPrior = p->pPrior; p->pPrior = 0; diff --git a/src/where.c b/src/where.c index 1d4fa7b4b..d76d9f81e 100644 --- a/src/where.c +++ b/src/where.c @@ -4592,6 +4592,7 @@ WhereInfo *sqlite3WhereBegin( if( wctrlFlags & WHERE_WANT_DISTINCT ){ pWInfo->eDistinct = WHERE_DISTINCT_UNIQUE; } + ExplainQueryPlan((pParse, 0, "SCAN CONSTANT ROW")); }else{ /* Assign a bit from the bitmask to every term in the FROM clause. ** |