SQLite

Check-in [1b95544f84]
Login

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

Overview
Comment:Add an extra column to a table in analyze9.test to give the planner a little more reason to select an index.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | experimental-costs
Files: files | file ages | folders
SHA1: 1b95544f84bf83c28cc15f6d0690fdf8a6bb3941
User & Date: dan 2014-04-28 12:08:23.821
Context
2014-04-28
15:11
Update unordered.test to take into account for the fact that SQLite now prefers a full-table scan over a non-covering index scan that visits a large percentage of the table rows. (check-in: 20f468dfbc user: dan tags: experimental-costs)
12:08
Add an extra column to a table in analyze9.test to give the planner a little more reason to select an index. (check-in: 1b95544f84 user: dan tags: experimental-costs)
10:00
Update test script analyze3.test to account for the fact that SQLite now prefers a full-table scan over a non-covering index scan that visits a large percentage of the table rows. (check-in: 35f46a55d8 user: dan tags: experimental-costs)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/analyze9.test.
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
#-------------------------------------------------------------------------
# Check that affinities are taken into account when using stat4 data to
# estimate the number of rows scanned by a rowid constraint.
#
drop_all_tables
do_test 13.1 {
  execsql {
    CREATE TABLE t1(a, b, c);
    CREATE INDEX i1 ON t1(a);
    CREATE INDEX i2 ON t1(b, c);
  }
  for {set i 0} {$i<100} {incr i} {
    if {$i %2} {set a abc} else {set a def}
    execsql { INSERT INTO t1(rowid, a, b, c) VALUES($i, $a, $i, $i) }
  }







|







562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
#-------------------------------------------------------------------------
# Check that affinities are taken into account when using stat4 data to
# estimate the number of rows scanned by a rowid constraint.
#
drop_all_tables
do_test 13.1 {
  execsql {
    CREATE TABLE t1(a, b, c, d);
    CREATE INDEX i1 ON t1(a);
    CREATE INDEX i2 ON t1(b, c);
  }
  for {set i 0} {$i<100} {incr i} {
    if {$i %2} {set a abc} else {set a def}
    execsql { INSERT INTO t1(rowid, a, b, c) VALUES($i, $a, $i, $i) }
  }