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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -