tags:

views:

59

answers:

4

Could SQLite be an alternative for mysql in high traffic web sites? Thanks

+1  A: 

No! It cannot be!

NinethSense
Mysql already is not a good solution. We have to using memcache ect or dummy fopen() , fwrite() !
phpExe
+2  A: 

No way. SQLLite deals terribly with concurrency. The database would be a huge performance bottleneck.

Júlio Santos
+1  A: 

Only if you push your data to a cache and read from the cache. SQLite can be used as persistence for cache, but its really not recommended.

Scott
+2  A: 

The short answer is: SQLite is embedded database. It is purpose is different than standalone RBDMS. While it is quicker with simple queries than MySQL, keep in mind that SQLite has:

  • no good networking support (SQLite purpose is different), so replication is PITA
  • coarse-grained locking (one write at a time)
  • no advanced table statistics
  • no sophisticated query optimizer
  • high memory consumption with large databases (a 100GB database would require about 25MB or RAM before each transaction)

Then if you do not plan to use SQLite over network, database sizes are quite small, queries are rather simple, and you have a lots of reads (and really small number of writes), then SQLite may be a better choice.

About MySQL: optimizing and using MySQL in super high traffic sites is not for faint hearted. I recommend some good reading:

c64ification