Practical use of indexes

I treat non-clustered indexes as “shadow copies” of a table that are ordered differently (thank you MongoDB).

Just like in a spreadsheet, a database table is a grid of data. But unlike a spreadsheet you cannot change the order by clicking on a heading with a mouse.

So by creating differently ordered copies of a table you can improve the performance of specific queries.

Additionally, you can pare down these shadow copies to just the columns and rows your query needs. Like fish in a barrel 🙂

The down side of having multiple copies of the same table, is that they each individually need to be kept in sync whenever the data changes.

Leave a comment