Clemens Ladisch wrote:
> 
> > Frank Millman wrote:
> > I have a fairly complex query. If I execute it using Python, it takes
> > 1 second. If I copy and paste it into the Sqlite3 command window, it
> > takes 10 minutes.
> 
> Probably different SQLite versions.
> 
> What is the EXPLAIN QUERY PLAN output in both cases?
> 


Thanks, Clemens. You just beat me to it.

I was about to reply that I had forgotten to check that, but now that I have, I 
see that Python is using Sqlite3 3.14.2.

I won’t show the query plan unless you really want to see it. The query 
involves a JOIN to a VIEW, which then has to retrieve data from the underlying 
physical tables. Obviously some work has been done to optimise this in more 
recent versions.

Frank
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to