I have a small table with 18 columns and 602 rows. It has two indexes on it; one clustered on the primary key and the other non-clustered index includes the primary key and a column that is the primary key in a table that is used in conjunction with this one to apply pricing levels to customers.
This is my readout when I run dbcc showcontig:
DBCC SHOWCONTIG scanning 'np_price_list' table...
Table: 'np_price_list' (158623608); index ID: 1, database ID: 9
TABLE level scan performed.
- Pages Scanned................................: 11
- Extents Scanned..............................: 4
- Extent Switches..............................: 3
- Avg. Pages per Extent........................: 2.8
- Scan Density [Best Count:Actual Count].......: 50.00% [2:4]
- Logical Scan Fragmentation ..................: 27.27%
- Extent Scan Fragmentation ...................: 75.00%
- Avg. Bytes Free per Page.....................: 760.5
- Avg. Page Density (full).....................: 90.60%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
This is what dbcc showcontig shows for the other table -- also a very small one with 561 rows and 18 columns.
USE openp
GO
DECLARE @id int, @indid int
SET @id = OBJECT_ID('np_price_rule')
SELECT @indid = indid
FROM sysindexes
WHERE id = @id
AND name = 'aunmind'
DBCC SHOWCONTIG (@id, @indid)
GO
In asking you guys questions yesterday about indexing and fragmentation, you told me that I wanted the scan density to be as close to 100% as possible. I've run index wizard against this table and it has not recommended any changes in indexing, yet 50% is the best I can get on either of them.
Can any of you give me a direction to look in to better improve these tables? They are heavily used since they contain the pricing rules used to price out anything that is not an inventory item.
Thanks!
Margaret
This is my readout when I run dbcc showcontig:
DBCC SHOWCONTIG scanning 'np_price_list' table...
Table: 'np_price_list' (158623608); index ID: 1, database ID: 9
TABLE level scan performed.
- Pages Scanned................................: 11
- Extents Scanned..............................: 4
- Extent Switches..............................: 3
- Avg. Pages per Extent........................: 2.8
- Scan Density [Best Count:Actual Count].......: 50.00% [2:4]
- Logical Scan Fragmentation ..................: 27.27%
- Extent Scan Fragmentation ...................: 75.00%
- Avg. Bytes Free per Page.....................: 760.5
- Avg. Page Density (full).....................: 90.60%
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
This is what dbcc showcontig shows for the other table -- also a very small one with 561 rows and 18 columns.
USE openp
GO
DECLARE @id int, @indid int
SET @id = OBJECT_ID('np_price_rule')
SELECT @indid = indid
FROM sysindexes
WHERE id = @id
AND name = 'aunmind'
DBCC SHOWCONTIG (@id, @indid)
GO
In asking you guys questions yesterday about indexing and fragmentation, you told me that I wanted the scan density to be as close to 100% as possible. I've run index wizard against this table and it has not recommended any changes in indexing, yet 50% is the best I can get on either of them.
Can any of you give me a direction to look in to better improve these tables? They are heavily used since they contain the pricing rules used to price out anything that is not an inventory item.
Thanks!
Margaret