Quantcast

upgrade from 2 to 3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

upgrade from 2 to 3

cronos-2
I've just upgraded my program from using v2.8.16 of sqlite to using v3.2.1
of sqlite. So I've change the wrapper class that I was using to use the new
prepare() instead of compile() etc. The problem I have is that my program is
now running slower - a lot slower, as in one fiftieth of its previous speed.
Is there something obvious that I have overlooked in the changes ? I've
added indexes to tables and synchronous is now off but its made no
improvement.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: upgrade from 2 to 3

cronos-2
Nevermind, it seems I have found the cause, I was doing:
                sqlthread->exec("PRAGMA synchronous = 0;",NULL,NULL);
                sqlthread->exec("PRAGMA cache_size = 4000;",NULL,NULL);

but changing it to this has sorted the problem out:
                sqlthread->exec("PRAGMA cache_size = 4000;",NULL,NULL);
                sqlthread->exec("PRAGMA synchronous = 0;",NULL,NULL);

It seems the value of synchronous gets changed back to full if you change
the cache_size.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Re: upgrade from 2 to 3

Tim McDaniel
In reply to this post by cronos-2
I would file that as a bug, or at least as needing to be documented.

> -----Original Message-----
> From: Cronos [mailto:[hidden email]]
> Sent: Saturday, May 21, 2005 12:49 PM
> To: [hidden email]
> Subject: [sqlite] Re: upgrade from 2 to 3
>
> Nevermind, it seems I have found the cause, I was doing:
> sqlthread->exec("PRAGMA synchronous = 0;",NULL,NULL);
> sqlthread->exec("PRAGMA cache_size = 4000;",NULL,NULL);
>
> but changing it to this has sorted the problem out:
> sqlthread->exec("PRAGMA cache_size = 4000;",NULL,NULL);
> sqlthread->exec("PRAGMA synchronous = 0;",NULL,NULL);
>
> It seems the value of synchronous gets changed back to full
> if you change the cache_size.
>
>
Loading...