Why does DBD::SQLite have a different query plan for an SQL statement -
i have insert ... select ... from
sql statement runs acceptably fast when executed sqlite's command line shell.
however, if execute same statement (copy/pasted) perl's dbi::sqlite
, statement becomes slow.
the reason must execution plan: when let statemtent explained shell , within dbi::sqlite, they're different: fast version uses optimal indexes , table order, slow version chooses access tables in less optimal way.
so, have 2 questions. why plan different? not have expected that. , how can make plan used in perl environment same in shell?
Comments
Post a Comment