mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-16 23:02:26 +03:00
Disable the skip-scan optimization for DISTINCT queries.
Fix for ticket [ced41c7c7d6b4d36] FossilOrigin-Name: a871d69c6de65038360aa6142fbad22689fb347e526cca56bb83e695c1441fbe
This commit is contained in:
@@ -2723,6 +2723,7 @@ static int whereLoopAddBtreeIndex(
|
||||
&& pProbe->noSkipScan==0
|
||||
&& OptimizationEnabled(db, SQLITE_SkipScan)
|
||||
&& pProbe->aiRowLogEst[saved_nEq+1]>=42 /* TUNING: Minimum for skip-scan */
|
||||
&& (pWInfo->wctrlFlags & (WHERE_WANT_DISTINCT|WHERE_DISTINCTBY))==0
|
||||
&& (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK
|
||||
){
|
||||
LogEst nIter;
|
||||
|
||||
Reference in New Issue
Block a user