Performance Reduction While Using SQLite3 Interface In Python -
i learning sqlite3 , using through python interface.
my sqlite3 script includes several view creation , select * viewx limit n;
statement @ end.
when run in sqlite3 on shell, instantaneous (the version of sqlite3 3.7.7.1)
on other hand, when run in python using executescript, takes more time (the version of sqlite3 in python 3.8.8.1)
i curious why happening.
the output of explain query plan
is:
in shell:
0|0|1|scan table table1 t1 (~1000000 rows) 0|1|2|search table table2 t2 using integer primary key (rowid=?) (~1 rows) 0|2|0|search table table3 t3 using index index_3 (x_id=?) (~10 rows)
in python:
(0, 0, 1, 'scan table table1 t1') (0, 1, 2, 'search table table2 t2 using integer primary key (rowid=?)') (0, 2, 0, 'search table table3 t3 using index index_3 (x_id=?)')
Comments
Post a Comment