views:

963

answers:

2

Since this doesn't touch a real problem of mine I'm somwhat uncertain, if it is even worth to be asked here. However maybe some of you would like to share your opinion on that.

In general I have to admit, that 'better' means anything and nothing at all at the same time. So I probably should be more specific, but I tried not to overflow the topic. In a regular hosted environment on one of those cheap webhosters (like Dreamhost), with around 1000 articles in Joomla, a couple of users and a few hundreds visitors a day, would a SQLite database with a persistent connection (sqlite_popen) perform noticeable faster than the MySQL equivalent (with the TCP/IP overhead etc.)?

Or in short: Would it be wise to call Joomla to support SQLite?

A: 

Linux ISPs for whatever reason seem to have settled on MySQL. This is what they offer and you will lock yourself to a limited number of service providers if you wander outside the norm.

ojblass
+4  A: 

I have never used sqlite on a website, but I have used it extensively for other purposes and I quite like it. The truth is, you won't know till you try. If you try, I reccomend creating a db abstraction layer first so that you can easily swap in other db's.

The downside to sqlite is that it's not really meant to be a multi user database. If you rarely write to the db, but do lots of reading, sqlite will probably be fine. If you find that you need multiple processes writing to the same db, I believe sqlite uses file level locking to maintain database consistency.. So, if all you're tables are in the same file, you'll lock the whole file while it's being written to even if another process wants to modify a completely different table.

In my opinion it's not the big multi user databases of the world that should be worried about competition from sqlite... It's all the regular files out there (and there custom file formats) that applications create and use that should be shaking in their boots about sqlite...

dicroce
+1 But I would add emphasis to the point that it's not, or wasn't originally designed to be a multi-user database.
altCognito
Haven't looked under Joomla's hood yet, but you are probably right: Nothing beats a real world test. As far as I can tell, Joomla already tries to implement some kind of abstraction layer, so testing it will only be a matter of time and good will. However, constant write access by multiple users (logging etc.) will probably kill any advantages gained by local file access instead of the TCP/IP connections.. YES! For storing uniform properties or options SQLite is a very nice and fast alternative to XML or creating yet another ascii/.txt file format...
merkuro
Joomla does have a database abstraction layer; it would be possible to write a SQLite driver for it. Joomla doesn't support SQLite because nobody has bothered to write the driver. The vast majority of Joomla users have access to MySQL on their hosting plans, so there isn't a lot of incentive for the Joomla core team to work on SQLite support. However, if you do write a driver, I'm sure it would be welcomed :)
jlleblanc
Booh cannot find the posting again, but I remember reading someone who already tried this with a very old version of Joomla... I heard some rumors about PostgreSQL support in the upcoming 1.6 version.. but we will see.
merkuro