/ Check-in [8d9f29f8]
Login

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

Overview
Comment:Increase the estimated full-scan cost for an FTS3 table.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | nextgen-query-plan-exp
Files: files | file ages | folders
SHA1:8d9f29f847f38612447c79a5fb366a9143ef6205
User & Date: drh 2013-06-04 13:07:44
Context
2013-06-04
13:37
Better determination of when an index is UNIQUE. check-in: 63fd025a user: drh tags: nextgen-query-plan-exp
13:07
Increase the estimated full-scan cost for an FTS3 table. check-in: 8d9f29f8 user: drh tags: nextgen-query-plan-exp
12:58
Fix a display issue with EXPLAIN QUERY PLAN. check-in: ff2fa407 user: drh tags: nextgen-query-plan-exp
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3.c.

  1419   1419     int iLangidCons = -1;           /* Index of langid=x constraint, if present */
  1420   1420   
  1421   1421     /* By default use a full table scan. This is an expensive option,
  1422   1422     ** so search through the constraints to see if a more efficient 
  1423   1423     ** strategy is possible.
  1424   1424     */
  1425   1425     pInfo->idxNum = FTS3_FULLSCAN_SEARCH;
  1426         -  pInfo->estimatedCost = 500000;
         1426  +  pInfo->estimatedCost = 5000000;
  1427   1427     for(i=0; i<pInfo->nConstraint; i++){
  1428   1428       struct sqlite3_index_constraint *pCons = &pInfo->aConstraint[i];
  1429   1429       if( pCons->usable==0 ) continue;
  1430   1430   
  1431   1431       /* A direct lookup on the rowid or docid column. Assign a cost of 1.0. */
  1432   1432       if( iCons<0 
  1433   1433        && pCons->op==SQLITE_INDEX_CONSTRAINT_EQ