SQLite.jl icon indicating copy to clipboard operation
SQLite.jl copied to clipboard

Partial execution of the SQL query

Open gryumov opened this issue 2 years ago • 1 comments

When executing the query, indexes for the test_log table were not created

using SQLite

const SQLite_CREATE =  """
    create table if not exists test_log (
        var_time       integer not null
       ,var_updated_at integer not null
       ,var_publisher  text    not null
       ,var_name       text    not null
       ,var_value      float   null
       ,var_count      integer null
    );

    create index if not exists idx_test_log_var_name
        on test_log (var_name);

    create index if not exists idx_test_log_var_time_var_name
        on test_log (var_time, var_name);
"""

connection = SQLite.DB("test.sqlite")

DBInterface.execute(connection, SQLite_CREATE)
sqlite> EXPLAIN QUERY PLAN select * from test_log where var_name = 'test';
QUERY PLAN
`--SCAN test_log

gryumov avatar Sep 02 '23 11:09 gryumov

Duplicate of https://github.com/JuliaDatabases/SQLite.jl/issues/303

metab0t avatar Sep 02 '23 13:09 metab0t