One of the best things about drupal is how modular it is, but this same great feature can also be its downfall. The more modules a user loads the more database queries, the more queries more drupal’s performance is affected. This is even more of a factor when your database is not running off the localhost.
Files system access is very fast. Why can’t we utilize the file system for some things to reduce drupal cores database queries?
Why cant we have a directory called files/drupal/
Then any tables that modules do not access directly and only access using core function can be moved to the file system.
There are 2 places I think this would be easy to do.
Variables and Cache.
To change variable_get() and variable_set() should be easy.
When it comes to cache tables I found this issue to be very interesting. http://drupal.org/node/45414
This never made into core and it ended up becoming a module. If we forget about the fastpath stuff and do as Dries suggested (cache.db.inc + cache.fs.inc) this could also be moved to the file system very easily.
One more place I think we could do this is with sessions. But the session table can be used directly by modules. So, another thing that can slow down queries is the size of the data returned. So why don’t we move just the session data to the file system.