Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Django Caching System is Faster: Filesystem or DB?

I know there isn't necessarily a clear cut between these two like there is between Memcached an DB/Filesystem, but I'm wondering what conditions would lead to filesystem being faster than DB caching. And, conversely, under what conditions would DB caching be faster than filesystem?

like image 971
Arion Avatar asked Sep 09 '11 20:09

Arion


1 Answers

Filesystems are always faster than databases. Databases have overheads like locking, shard buffers, SQL parsing, query planning, etc., etc.

Ultimately, the database lives on the filesystem. A database is filesystem plus overheads.

like image 50
S.Lott Avatar answered Oct 18 '22 10:10

S.Lott