O'Reilly logo

Microsoft Dynamics AX 2012 R2 Administration Cookbook by Simon Buxton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reindexing tables or the whole database

To fully understand why we would ever need to re-index a table, we need to understand how indexes work within SQL Server.

An index, much like a book index, is a sorted list that we can use to lookup the page where the data actually is. This is much better than manually trawling through the table checking each record for a match. This is called a table scan.

Let's say we have a transport table that contains the following fields:

  • Transport Id
  • Transport status
  • Shipment date
  • Haulier Id

In this table, we need to ensure that the following things are true:

  • Transport Id is always unique
  • It has the ability to filter transport records for a Haulier
  • It has the ability to quickly lookup the status of a transport using the transport ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required