Interesting!
I've been using "PRAGMA page_size = 4096;" in my software. Perhaps I should 
increase it and see if I can get a performance gain.
 
Does it affect INSERTs too?
 
> Date: Tue, 22 Feb 2011 10:59:29 -0800
> From: fle...@fletchowns.net
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] COUNT() extremely slow first time!
> 
> I'm currently dealing with a similar issue. I've found that the page_size
> PRAGMA setting can have a dramatic effect on how long it takes to "warm up"
> the table. On Windows 7, with page_size=1024, a SELECT COUNT(last_column)
> takes 40.2 seconds. page_size=4096 takes 15.5 seconds. page_size=8192 takes
> 8.5 seconds. This was done with a reboot between each test.
> 
> This page recommends a page_size of 4096:
> http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows
> 
> If I see better performance with the larger page sizes (going to test 16384
> and beyond after this) is there any reason not to use them?
> 
> Greg
> 
> On Mon, Feb 21, 2011 at 4:37 PM, Stephen Oberholtzer <
> oliverkloz...@gmail.com> wrote:
> 
> > On Mon, Feb 21, 2011 at 11:35 AM, Jim Wilcoxson <pri...@gmail.com> wrote:
> > > On Mon, Feb 21, 2011 at 11:05 AM, Sven L <larvpo...@hotmail.se> wrote:
> > >>
> > >> Thank you for your detailed explanation!
> > >> First, can you please tell me how to purge the cache in Windows 7? This
> > could be very useful for my tests!
> > >
> > > Sorry, dunno for Windows. On Mac OSX it is the purge command, in the
> > > development tools. On Linux, you do: echo 3 >
> > > /prog/sys/vm/drop_caches
> >
> > Just make sure you either (a) quote the 3 (echo '3' >
> > /proc/sys/vm/drop_caches) or (b) put a space between the 3 and the >.
> > If you don't quote it, and you don't put the space in (echo
> > 3>/proc/sys/vm/drop_caches) it doesn't do anything, for reasons I
> > won't go into.
> >
> > --
> > -- Stevie-O
> > Real programmers use COPY CON PROGRAM.EXE
> > _______________________________________________
> > 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
                                          
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to