Jian Lin wrote:
> great... will try it out now.
> 
> actually, i was thinking, that the computer sometimes has 1GB free RAM 
> or 3GB free RAM (of the 4GB of RAM).  how come the OS doesn't 
> automatically create a cache for the 45MB db file?  If the OS creates 
> the cache, everything happens in memory, and it should be quite fast.
> 
> Is it true that sqlite3 actually flush the data into the hard drive? 
> but at least for the searching part, can it still happen just in RAM? 
> Can't MySQL or Sqlite3 actually have a mode so that the db can be cached 
> in RAM as much as possible?

The database can be cached in ram by most database engines. However, 
most database engines will also make sure that every transaction 
(insert, update, delete) is committed to disk by forcing a write to the 
physical disk for *every* transaction. If the database engine doesn't do 
this you risk losing part or all of your database if some kind of 
failure happens part way though your updates.

If you don't care if you lose part or all of your database, most 
database engines also have a setting for this.....

Cheers,
Gary.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to