SQLite

Check-in [de78250ad2]
Login

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

Overview
Comment:In the index_list pragma, make sure the "r" column is the same on output as it was on input in the sqlite_stat1 table.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | index-scan-rate
Files: files | file ages | folders
SHA1: de78250ad2a6210dd4f03045248f7192d64427f2
User & Date: drh 2013-10-05 02:56:25.653
Context
2013-10-05
18:16
Begin an experimental refactoring to estimate the average number of bytes in table and index rows and to use that information in query planner. Begin by renaming WhereCost to LogEst and making that type and its conversion routines available outside of where.c. (check-in: 66c4a251d6 user: drh tags: row-size-est)
02:56
In the index_list pragma, make sure the "r" column is the same on output as it was on input in the sqlite_stat1 table. (Closed-Leaf check-in: de78250ad2 user: drh tags: index-scan-rate)
2013-10-04
20:39
Merge trunk changes. (check-in: c6ac80ed8d user: drh tags: index-scan-rate)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/pragma.c.
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
        sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
        sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "unique", SQLITE_STATIC);
        sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "r", SQLITE_STATIC);
        while(pIdx){
          sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
          sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->onError!=OE_None, 3);
          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->iScanRatio*100/128, 4);
          sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 4);
          ++i;
          pIdx = pIdx->pNext;
        }
      }
    }
  }







|







1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
        sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
        sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "unique", SQLITE_STATIC);
        sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "r", SQLITE_STATIC);
        while(pIdx){
          sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
          sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->onError!=OE_None, 3);
          sqlite3VdbeAddOp2(v, OP_Integer, (pIdx->iScanRatio*100+127)/128, 4);
          sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 4);
          ++i;
          pIdx = pIdx->pNext;
        }
      }
    }
  }