Why 90% of production databases aren't indexed properly

Market

Database design isn’t rocket science but, at the same time, it is a craft which must take into account how the database will be used. More often than not this doesn’t happen and businesses everywhere are losing billions of micro-seconds on underperforming databases due to simple lack of care.

Ok, my figure of 90% is totally made up. However, I’m prepared to wager the real figure is high. I’ve not conducted any empirical studies – and it would probably be very hard to do so – but this is my genuine real-world experience and in fact this article is occasioned by my having to fix up yet another database provided by a vendor who didn’t know how to, or think to, optimise it.

What I’m talking about here comes down to one simple thing: indexing. That’s it.

Ok, sure, most developers and designers know they ought to index important fields. The database system will itself index the primary key by default.

(The primary key is the record or combination of records that uniquely identify any single row. For instance, a car registration plate is a natural primary key, as is a social security number or tax file number. A person’s first name is not a primary key because it has no guarantees of being unique in any arbitrary table of people.)

Actually, it’s possible to over-index a database. Every index will add time when data is inserted, deleted or modified because the database system has to adjust all those indexes.

However, I’m talking about something different. Clustered indexes. And I’m sick and tired of seeing clustered indexes ignored.

Let me tell you just what a clustered index is and why it matters. I’ll even show you with a real-world leading financial application.



SPONSORED PRESS RELEASES

Websense Security Labs Reports ‘User Trust’ Targeted Attacks; Over 1 in 10 ‘Top Search’ Results Categorised as Malware; Increased Focus on Web 2.0
Websense, Inc. today revealed the findings from its bi-annual research report: Websense Security Labs, State of Internet Security, Q3-Q4 2009.

Featured IT jobs

A varied DBA role that involves multitasking in a dynamic software development environment dealing with challenging customer needs on a daily basis.
Skills Tags:   Linux  Oracle  UAT
A position has just become available for experienced Program/Project Manager to join a large organisation on a major Data Centre upgrade....
Skills Tags:   SAP
URGENT! Experienced BDM needed for senior sales role in Melbourne - must have ITSM consultancy sales experience.
Skills Tags:   C  Development  EDI  IT
CRITICAL INCIDENT COORDINATOR - 24 x 7 shifts - 3 month CONTRACT ONLY...
Skills Tags:   Excel  IT  ITIL  Management  Reporting

Editors Picks

Stories you may have missed 

What iTWire offers for free

E - mail News SMS Headlines Desktop Alerts News Feeds Job Alerts Technology Events Press-Releases