The fastest DB call is NO DB call!

The fastest DB call is well, you read it right!, no DB call at all!

A typical DB call will typically go through a series of performance hurdles -
  1. network call to DB Server,
  2. DB query optimization with DB query interpretation/execution and
  3. DB disk read.
From a performance standpoint we have a few options that could do away with a few or even all of these above steps.

Option 1: Use Reverse Proxy for Static Content and don't get the call to the Web Server in the first place! Check for more details.

Option 2: Use Web Application Cache that returns the values right then and there.

Option 3: Use Memcached, the proven open-source distributed object cache mechanism.

The caveat with such approaches is the single question that is will your application benefit from these strategies. In some small intranet applications that we'd developed cacheing will make little sense as the target application will have a small user base and are closer to the users, so the need for performance optimization is never there.

Some other very remote cases will have a necessity to have complex joins which are not easy to develop with cache technologies like Memcached. The developer productivity will be higher in this case with a relational Database.

But The Fastest DB call will always be the NO DB call!



Bookmark/Share this post with:
Bookmark and Share

0 comments:

Post a Comment