0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 09:49:40 +00:00
ad hoc ad79ef48a2
libsql wal tests (#1408)
* add tests

* add bench
2024-05-24 13:59:17 +00:00

22 lines
519 B
Plaintext

CREATE TABLE t1(a,b,c,d);
WITH RECURSIVE c(x) AS (VALUES(0) UNION ALL SELECT x+1 FROM c WHERE x<100)
INSERT INTO t1(a,b,c,d)
SELECT x/10, x%10, x%19, x FROM c;
CREATE INDEX t1abc ON t1(a,b,c);
SELECT * FROM t1 WHERE c=4 ORDER BY a, b LIMIT 2;
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE c=4 ORDER BY a, b LIMIT 2;
DROP INDEX t1abc;
CREATE INDEX t1abd ON t1(a,b,d);
SELECT * FROM t1 WHERE c=4 ORDER BY a, b LIMIT 2;
EXPLAIN QUERY PLAN
SELECT * FROM t1 WHERE c=4 ORDER BY a, b LIMIT 2;