diff options
author | drh <> | 2021-08-02 16:41:57 +0000 |
---|---|---|
committer | drh <> | 2021-08-02 16:41:57 +0000 |
commit | f38524d20db165c94dc94e06b62f0aad5942a03b (patch) | |
tree | d5f916ae22a0bae1a3d7168c0b1a031d6c22da92 /src/where.c | |
parent | 79cf2b7120ea382a2649698656860d09740e6205 (diff) | |
download | sqlite-f38524d20db165c94dc94e06b62f0aad5942a03b.tar.gz sqlite-f38524d20db165c94dc94e06b62f0aad5942a03b.zip |
Refactor the Table object to reduce its memory footprint.
FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
Diffstat (limited to 'src/where.c')
-rw-r--r-- | src/where.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/where.c b/src/where.c index 4ea04e5c8..d7ef319b5 100644 --- a/src/where.c +++ b/src/where.c @@ -3060,7 +3060,7 @@ static int whereLoopAddBtree( ** those objects, since there is no opportunity to add schema ** indexes on subqueries and views. */ pNew->rSetup = rLogSize + rSize; - if( pTab->pSelect==0 && (pTab->tabFlags & TF_Ephemeral)==0 ){ + if( !IsView(pTab) && (pTab->tabFlags & TF_Ephemeral)==0 ){ pNew->rSetup += 28; }else{ pNew->rSetup -= 10; @@ -5211,7 +5211,7 @@ WhereInfo *sqlite3WhereBegin( pTab = pTabItem->pTab; iDb = sqlite3SchemaToIndex(db, pTab->pSchema); pLoop = pLevel->pWLoop; - if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ){ + if( (pTab->tabFlags & TF_Ephemeral)!=0 || IsView(pTab) ){ /* Do nothing */ }else #ifndef SQLITE_OMIT_VIRTUALTABLE @@ -5580,7 +5580,7 @@ void sqlite3WhereEnd(WhereInfo *pWInfo){ ** created for the ONEPASS optimization. */ if( (pTab->tabFlags & TF_Ephemeral)==0 - && pTab->pSelect==0 + && !IsView(pTab) && (pWInfo->wctrlFlags & WHERE_OR_SUBCLAUSE)==0 ){ int ws = pLoop->wsFlags; |