1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Have r-tree prefer to use the constraint "col MATCH ?" over "rowid = ?".

FossilOrigin-Name: b9fb95194d4f7c535f1d175fd2e18d69d76e8fc4
This commit is contained in:
dan
2015-05-22 16:08:42 +00:00
parent afe028a815
commit 6b76418e67
4 changed files with 32 additions and 10 deletions

View File

@ -77,6 +77,13 @@ do_execsql_test rtreeE-1.6 {
SELECT id FROM rt1 WHERE id MATCH Qcircle(0,0,1000,5) ORDER BY +id
} {0 2 4 6 8 10 12 14 16 18 20 22 24 100 102 104 106 108 110 112 114 116 118 120 122 124 200 202 204 206 208 210 212 214 216 218 220 222 224}
# Test that rtree prefers MATCH to lookup-by-rowid.
#
do_execsql_test rtreeE-1.7 {
SELECT id FROM rt1 WHERE id=18 AND id MATCH Qcircle(0,0,1000,5)
} {18}
# Construct a large 2-D RTree with thousands of random entries.
#
do_test rtreeE-2.1 {
@ -126,4 +133,5 @@ do_execsql_test rtreeE-2.4 {
SELECT id FROM rt2 WHERE id MATCH breadthfirstsearch(0,10000,0,10000) ORDER BY id
} $ans
finish_test