On Fri, Apr 18, 2008 at 05:46:26AM -0700, L B scratched on the wall:
> Hi all,
>   I have a query that, first time is executed, takes 40 seconds to give 
> results.
>   After the first execution, it takes about 15 seconds.
>   My question is: Is the db loaded into memory? I thought db is
>   read from hard disk every time, isn't it?
>   Why this difference in performance?

  This is likely the effects of the operating system file-system cache,
  which is perfectly safe for reads.

  SQLite also has a small page-cache that normally it defaults to
  about 2MB worth of database data.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"'People who live in bamboo houses should not throw pandas.' Jesus said that."
   - "The Ninja", www.AskANinja.com, "Special Delivery 10: Pop!Tech 2006"
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to