On 4/20/15, Nicolas Boullis <sqlite at ilcode.fr> wrote:
> Hi,
>
> On Mon, Apr 20, 2015 at 11:18:56AM +0200, Clemens Ladisch wrote:
>>
>> SQLite does not keep statistics automatically.  Run ANALYZE.
>
> Thanks for the explanation. I just performed some measurements.
>
> When I use the database with PRIMARY KEY/UNIQUE constraints, the program
> uses 540s of CPU time before ANALYZE, and 17.5s of CPU time after
> ANALYZE. Much better!
>
> But if I use the database withouth PRIMARY KEY/UNIQUE constraints, it
> uses 5.7s of CPU time before ANALYZE, and 86s of CPU time after ANALYZE?
>

Please send us:

(1) The output of "SELECT sqlite_source_id();"

(2) The complete text of you SELECT statement.

(3) The output of the ".fullschema" command from the most recent
version of the sqlite3.exe command-line shell run on your database
file after it is ANALYZE-ed.

-- 
D. Richard Hipp
drh at sqlite.org

Reply via email to