Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch index-shape-1 Excluding Merge-Ins
This is equivalent to a diff from f7079b5365 to d8daaba7da
2013-09-03
| ||
14:03 | Make sure the omit-noop-left-join optimization is not applied if columns of the LEFT JOIN are used in the ORDER BY clause. Ticket [be84e357c035] (check-in: 0303d6bc71 user: drh tags: trunk) | |
2013-09-02
| ||
23:40 | Add the experimental SQLITE_DEFAULT_INDEX_SHAPE=1 compile-time option that makes a much more pessimistic guess at the effectiveness of unanalyzed indices. (Leaf check-in: d8daaba7da user: drh tags: index-shape-1) | |
20:22 | Simplify branch coverage testing by interchanging the order of two tests in the whereLoopInsert() function. (check-in: f7079b5365 user: drh tags: trunk) | |
18:58 | Further stat4 related tests. (check-in: 0a702c4b4c user: dan tags: trunk) | |
Changes to src/build.c.
︙ | ︙ | |||
2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 | ** how aiRowEst[] should be initialized. The numbers generated here ** are based on typical values found in actual indices. */ void sqlite3DefaultRowEst(Index *pIdx){ tRowcnt *a = pIdx->aiRowEst; int i; tRowcnt n; assert( a!=0 ); a[0] = pIdx->pTable->nRowEst; if( a[0]<10 ) a[0] = 10; n = 10; for(i=1; i<=pIdx->nColumn; i++){ a[i] = n; if( n>5 ) n--; } if( pIdx->onError!=OE_None ){ a[pIdx->nColumn] = 1; } } /* ** This routine will drop an existing named index. This routine ** implements the DROP INDEX statement. */ void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){ | > > > > > > > > > > > > > > > > > > > | 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 | ** how aiRowEst[] should be initialized. The numbers generated here ** are based on typical values found in actual indices. */ void sqlite3DefaultRowEst(Index *pIdx){ tRowcnt *a = pIdx->aiRowEst; int i; tRowcnt n; #if !defined(SQLITE_DEFAULT_INDEX_SHAPE) || SQLITE_DEFAULT_INDEX_SHAPE==0 assert( a!=0 ); a[0] = pIdx->pTable->nRowEst; if( a[0]<10 ) a[0] = 10; n = 10; for(i=1; i<=pIdx->nColumn; i++){ a[i] = n; if( n>5 ) n--; } if( pIdx->onError!=OE_None ){ a[pIdx->nColumn] = 1; } #else /* if SQLITE_DEFAULT_INDEX_SHAPE==1 */ tRowcnt x = 1, nMax = pIdx->pTable->nRowEst; int iLog; int isUnique = pIdx->onError!=OE_None; assert( a!=0 ); a[0] = nMax; n = isUnique ? 1 : 10; for(iLog=1; n<nMax; iLog++, n<<=1){} i = pIdx->nColumn; x <<= iLog/i; //if( x>10 ) x = 10; a[i] = n = isUnique ? 1 : 10; while( i>1 ){ n *= x; a[--i] = n; } #endif } /* ** This routine will drop an existing named index. This routine ** implements the DROP INDEX statement. */ void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){ |
︙ | ︙ |