A case for denormalisation

For various reasons I carried out two sets of tests against to similar pages.  One page retrieves data from only one table in the database.  The other page retrieves data by bridging between several tables.  The results changed from around 2ms to 40ms leaving a huge difference to be accounted for merely in the DBMS creating the joins.

If time is available (and I think it is) it will be interesting to investigate whether this result can be improved by introducing a denormalised field in the database.  I suspect this to be rather easy but in reality would also require some complex logic to be executed on update (probably as a trigger).

Advertisement
Published in: on October 5, 2009 at 1:50 pm  Leave a Comment  

The URI to TrackBack this entry is: http://djcasey.wordpress.com/2009/10/05/a-case-for-denormalisation/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.