3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
10 #***********************************************************************
12 # This file focuses on testing the planner (xBestIndex function).
15 source [file join [file dirname [info script]] fts5_common.tcl]
16 set testprefix fts5plan
18 # If SQLITE_ENABLE_FTS5 is defined, omit this file.
25 CREATE TABLE t1(x, y);
26 CREATE VIRTUAL TABLE f1 USING fts5(ff);
30 SELECT * FROM t1, f1 WHERE f1 MATCH t1.x
34 `--SCAN f1 VIRTUAL TABLE INDEX 0:M1
38 SELECT * FROM t1, f1 WHERE f1 > t1.x
41 |--SCAN f1 VIRTUAL TABLE INDEX 0:
46 SELECT * FROM f1 WHERE f1 MATCH ? ORDER BY ff
49 |--SCAN f1 VIRTUAL TABLE INDEX 0:M1
50 `--USE TEMP B-TREE FOR ORDER BY
54 SELECT * FROM f1 ORDER BY rank
57 |--SCAN f1 VIRTUAL TABLE INDEX 0:
58 `--USE TEMP B-TREE FOR ORDER BY
62 SELECT * FROM f1 WHERE rank MATCH ?
63 } {SCAN f1 VIRTUAL TABLE INDEX 0:r}