Hi,
Information provided as requested.
_temptable is a temporary table which contains a list of oids (integer, ~ 10
rows) to consider.
Stats3
tbl idx neq nlt ndlt sample
stack_elem idx_rel_stack_elem_soid 4 0
0 406
stack_elem idx_rel_stack_elem_oid 1 0
0 4
stack_elem idx_rel_stack_elem_oid 1 1
1 5
stack_elem idx_rel_stack_elem_oid 1 2
2 6
stack_elem idx_rel_stack_elem_oid 1 3
3 133
stack_elem idx_rel_stack_elem_soid_oid 4 0
0 406
Stats2
tbl idx stat
stack idx_rel_stack_toid_rtype 210 1 1
stack_elem idx_rel_stack_elem_soid 4 4
stack_elem idx_rel_stack_elem_oid 4 1
stack_elem idx_rel_stack_elem_soid_oid 4 4 1
For query 2.1
selectid order from detail
1 0 0 SCAN TABLE stack_elem AS e USING
INDEX idx_stack_elem_oid
1 1 1 SEARCH TABLE stack AS s USING
INTEGER PRIMARY KEY (rowid=?)
1 2 2 SEARCH TABLE _temptable AS _t
USING INTEGER PRIMARY KEY (rowid=?)
1 3 3 SEARCH TABLE _temptable AS _t2
USING INTEGER PRIMARY KEY (rowid=?)
2 0 1 SCAN TABLE stack AS s
2 1 2 SEARCH TABLE _temptable AS _t
USING INTEGER PRIMARY KEY (rowid=?)
2 2 0 SEARCH TABLE rel_rel AS r USING
COVERING INDEX idx_rel_rel (moid=?)
2 0 0 USE TEMP B-TREE FOR DISTINCT
2 0 0 USE TEMP B-TREE FOR ORDER BY
0 0 0 COMPOUND SUBQUERIES 1 AND 2 (UNION)
For query 2.2
selectid order from detail
0 0 0 SEARCH TABLE stack USING INTEGER
PRIMARY KEY (rowid=?)
0 0 0 EXECUTE LIST SUBQUERY 0
0 0 0 SCAN TABLE stack USING COVERING
INDEX idx_stack_toid_rtype
0 1 1 SEARCH TABLE stack_elem USING
COVERING INDEX idx_stack_elem_soid_oid (soid=?)
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users