Re:Behold WordPress, Destroyer of CPUs
by newt0311 on Wednesday April 23, 2008 @12:19PM
(#171616)
Better solution: Build caching into the DB. Then every program using the DB gets free data caching and there is more general code reuse. Interesting how RDBMS's like Postgres and Oracle already have it.
[ Parent
| on HN ]
I don't see how caching in the DB would improve performance much. The best you could do would probably be to cache the most expensive queries.
The main advantage of having caching in your application is that you can cache your data in a more high-level way, i.e. taking into account the way the data is going to be used. So you can pre-process your data as much as possible and store the result of this.
Compared to that a cache in the DB would be rather dumb. This isn't to say that a database cache is useless but just not a replacement for having caching directly in your app.