mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-18 10:21:03 +03:00
Prevent the WhereLoop.rSetup cost estimate from going negative on complex
queries. FossilOrigin-Name: f81050859170c8708a1b296da8dd3ef0dd314a11
This commit is contained in:
@@ -2701,6 +2701,7 @@ static int whereLoopAddBtree(
|
||||
pNew->rSetup += 24;
|
||||
}
|
||||
ApplyCostMultiplier(pNew->rSetup, pTab->costMult);
|
||||
if( pNew->rSetup<0 ) pNew->rSetup = 0;
|
||||
/* TUNING: Each index lookup yields 20 rows in the table. This
|
||||
** is more than the usual guess of 10 rows, since we have no way
|
||||
** of knowing how selective the index will ultimately be. It would
|
||||
|
||||
Reference in New Issue
Block a user