How to add sqlite-support?

How to add sqlite-support?

Maik Riecken -
回帖数:3
Hi,

I am just realizing a totally RAM present MySQL-Database by tuning all buffers and caches

Now I am wondering if it would be possible to add sqlite-support to moodle (adodb has). The idea is to store the sqlite-database inside a ramdisk - one file can be easily backuped frequently to hdd - this should give a "little" more power and breath to the I/O-System. It should be possible to "stress" the CPU more, which is normally boring in ourdays.
We are not talking about extremly huge databases (0.5-1.0 GB). Before I'll start I just want to know if this idea is totally crazy or not and just one or two hints where to begin...

regards,

Maik
回复Maik Riecken

Re: How to add sqlite-support?

Martín Langhoff -
It's a great idea, and quite doable too. Have a look at the lib/xmldb directory. But be aware: it'll be great for small single installs, with one or two users (like Moodle-on-a-stick cases, or the MoodleClient project).

sqlite has good performance with a single user, but does not scale at all well with concurrency - writes lock the db. And web applications see a lot of concurrency.

So the benefits I'd expect of a SQLite support layer in XMLDb are a bit different -- and it'll be great if you can do it!

OTOH, if you are wanting to have a really fast MySQL on a RAM disk, you can do that too. Just move the mysql storage directory to a RAM disk.

As with the sqlite-on-a-ramdisk plan you do need a way to copy it to a real disk too -- or you'll just lose the data!