aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-01-30 20:44:54 +0000
committerdrh <>2023-01-30 20:44:54 +0000
commitf7af9ba13cb7ef413c5202d12678a475ed1234c9 (patch)
treea53c218df38f8a433826c571076b773bc9630fd7 /src
parent26c7cff254b09285c41e82656f5fa53cd7ce95f8 (diff)
downloadsqlite-f7af9ba13cb7ef413c5202d12678a475ed1234c9.tar.gz
sqlite-f7af9ba13cb7ef413c5202d12678a475ed1234c9.zip
Additional tweaks to the enhancement at [609fbb94b8f01d67] to further reduce
the cost estimate for constructing an automatic index on an ephemeral table, in order to resolve the performance problem described by [forum:/forumpost/1d571c0296|forum post 1d571c0296]. FossilOrigin-Name: bf1aae7a8c7f2c74681aa29baa35259d10ce6a1737d2607def6bf27fed592131
Diffstat (limited to 'src')
-rw-r--r--src/where.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/where.c b/src/where.c
index 6a9edd028..51e018c97 100644
--- a/src/where.c
+++ b/src/where.c
@@ -3595,7 +3595,8 @@ static int whereLoopAddBtree(
if( !IsView(pTab) && (pTab->tabFlags & TF_Ephemeral)==0 ){
pNew->rSetup += 28;
}else{
- pNew->rSetup -= 10;
+ pNew->rSetup -= 25; /* Greatly reduced setup cost for auto indexes
+ ** on ephemeral materializations of views */
}
ApplyCostMultiplier(pNew->rSetup, pTab->costMult);
if( pNew->rSetup<0 ) pNew->rSetup = 0;