Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix the STAT4 range scan estimates for DESC indexes. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
e3fe84005259ef9a6027d25793514ceb |
User & Date: | drh 2014-10-08 02:53:25.568 |
Context
2014-10-08
| ||
11:11 | Remove some temporary code in mallocA.test that was accidentally checked in. (check-in: dedd15f7cd user: dan tags: trunk) | |
02:53 | Fix the STAT4 range scan estimates for DESC indexes. (check-in: e3fe840052 user: drh tags: trunk) | |
00:08 | More intuitive labels on ".wheretrace" output. (check-in: adcb3fed48 user: drh tags: trunk) | |
Changes
Changes to src/where.c.
︙ | |||
2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 | 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 | + + + + + + + - - + - - + | }else{ /* Note: this call could be optimized away - since the same values must ** have been requested when testing key $P in whereEqualScanEst(). */ whereKeyStats(pParse, p, pRec, 0, a); iLower = a[0]; iUpper = a[0] + a[1]; } assert( pLower==0 || (pLower->eOperator & (WO_GT|WO_GE))!=0 ); assert( pUpper==0 || (pUpper->eOperator & (WO_LT|WO_LE))!=0 ); if( p->pKeyInfo && p->pKeyInfo->aSortOrder[nEq] ){ /* The roles of pLower and pUpper are swapped for a DESC index */ SWAP(WhereTerm*, pLower, pUpper); } /* If possible, improve on the iLower estimate using ($P:$L). */ if( pLower ){ int bOk; /* True if value is extracted from pExpr */ Expr *pExpr = pLower->pExpr->pRight; |
︙ |
Added test/analyzeE.test.