Giuseppe, What version of the sqlite3 library is python using?
>python Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> cn = sqlite3.connect(':memory:') >>> sqlite3.version '2.6.0' >>> sqlite3.sqlite_version '3.8.6' >>> cn.cursor().execute('select sqlite_version();').fetchall() [(u'3.8.6',)] >>> for i in range(20): ... cn.cursor().execute('select sqlite_compileoption_get(?);',(i,)).fetchall() ... [(u'DEFAULT_LOCKING_MODE=0',)] [(u'ENABLE_COLUMN_METADATA',)] [(u'ENABLE_FTS3',)] [(u'ENABLE_FTS3_PARENTHESIS',)] [(u'ENABLE_FTS4',)] [(u'ENABLE_LOAD_EXTENSION',)] [(u'ENABLE_MEMORY_MANAGEMENT',)] [(u'ENABLE_MEMSYS5',)] [(u'ENABLE_RTREE',)] [(u'ENABLE_STAT4',)] [(u'MAX_SCHEMA_RETRY=50',)] [(u'SOUNDEX',)] [(u'SYSTEM_MALLOC',)] [(u'TEMP_STORE=2',)] [(u'THREADSAFE=1',)] [(None,)] [(None,)] [(None,)] [(None,)] [(None,)] >>> >-----Original Message----- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Simon Slavin >Sent: Thursday, 7 August, 2014 09:26 >To: General Discussion of SQLite Database >Subject: Re: [sqlite] After ANALYZE all has become slow > > >On 7 Aug 2014, at 3:24pm, Giuseppe Costanzi <giuseppecosta...@gmail.com> >wrote: > >> I have finished running ANALYZE and SQLite commands are taking longer >> only when I use python db api >> such as >> [...] >> >> however I have done what you have pointed out me and in effects the >> speed of execution >> from the shell is best after having performed ANALYZE >> as I would be me expected [snip] > >> I have also noticed that, using python db api2 if I perform a query >> recalling a view on the database >> this it is slower if I directly write the query in the script of python >> For example if I perform [...] >> and this independently from ANALTYZE but after run ANALYZER the >> situation worsens > >Very good. If you had a situation where the Shell Tool got slower on >ANALYZE then it would definitely be an error in SQLite and we could >investigate. But you are reporting a situation where the Shell Tool gets >faster but Python gets slower. > >This makes me think that the fault is with your Python library. I don't >know enough about Python to help. I am going to hope that someone >familiar with Python sees this and can help you. > >Simon. >_______________________________________________ >sqlite-users mailing list >sqlite-users@sqlite.org >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users