Keep as few indexes as possible

Indexes are stored on the disk and the amount of space required depends on the size of the table and the number and types of columns used in index. Sometimes you may feel very surprised that the indexes will take up much more space than you expect.
The following steps will show you the index size in some Axapta tables under Axapta standard demo data environment.
In your windows operating system, open the SQL Server Query Analyzer, log in as bmssa.
 In the query pane, type in
Use Axdb
exec sp_spaceused
LedgerTrans
On the toolbar, click the Execute Query button.
According to the output, the table data uses 88 kilobytes, while the table indexes use 2.5 times as much, or 224 kilobytes.
And if in query pane, type in
Use Axdb
Exec sp_spaceused inventDim
On the toolbar, click the Execute Query button.
You can find that the ratio of index size to table size is more than 3 times.
The ratio of index size to table size can vary greatly, depending on the columns, data types, and number of indexes on a table. Thereafter you should only create indexes when they are actually needed.

Advertisements
This entry was posted in Axapta Development. Bookmark the permalink.

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 )

Google+ photo

You are commenting using your Google+ 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