SQLite

Check-in [19dad0a720]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem in STAT4 equality estimation for multi-column indexes introduced by check-in [3e0590dee0e68cc1599].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | branch-3.8.9
Files: files | file ages | folders
SHA3-256: 19dad0a720c41d1d111f42cb2cb1f291c559957e76e3f88dc6cfc065e4845e77
User & Date: drh 2017-05-24 04:32:09.002
Context
2017-06-06
18:22
Add the SQLITE_DEFAULT_ROWEST compile-time option for changing the estimated number of rows in tables that lack sqlite_stat1 entries. (check-in: 802b82f342 user: drh tags: branch-3.8.9)
2017-05-24
04:32
Fix a problem in STAT4 equality estimation for multi-column indexes introduced by check-in [3e0590dee0e68cc1599]. (check-in: 19dad0a720 user: drh tags: branch-3.8.9)
04:18
Fix a problem in STAT4 equality estimation for multi-column indexes introduced by check-in [3e0590dee0e68cc1599]. (check-in: cfb0d9e020 user: drh tags: trunk)
2017-05-22
00:27
When planning a query using sorting, resolve ties in the solver by selecting loop plans with the smaller unsorted cost. (check-in: 962531e7c1 user: drh tags: branch-3.8.9)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/where.c.
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
    }
    if( roundUp ){
      iGap = (iGap*2)/3;
    }else{
      iGap = iGap/3;
    }
    aStat[0] = iLower + iGap;
    aStat[1] = pIdx->aAvgEq[iCol];
  }

  /* Restore the pRec->nField value before returning.  */
  pRec->nField = nField;
  return i;
}
#endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */







|







2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
    }
    if( roundUp ){
      iGap = (iGap*2)/3;
    }else{
      iGap = iGap/3;
    }
    aStat[0] = iLower + iGap;
    aStat[1] = pIdx->aAvgEq[nField-1];
  }

  /* Restore the pRec->nField value before returning.  */
  pRec->nField = nField;
  return i;
}
#endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */