I've been reading a lot about DBCC DBREINDEX, DBCC INDEXDEFRAG etc., but I really need to get a better understanding of indexes in general.I see there are two types of indexes: clustered and nonclustered. I'm learning the differences and advantages between the two.A couple of questions.How can I find the actual index or indexes on a table? Is that possible? It is important to know the actual indexes on tables, yes?I ask this because I want to fully understand how indexes work, the type of maintenance that is needed, and any other caveats that come with it.For example, here is a before and after DBCC SHOWCONTIG on a table I ran DBREINDEX on (this is a test DB, so if I FUBARD it, its ok)DBCC SHOWCONTIG scanning 'S_OPTY_X' table...Table: 'S_OPTY_X' (5835333); index ID: 1, database ID: 7TABLE level scan performed.- Pages Scanned................................: 2015- Extents Scanned..............................: 262- Extent Switches..............................: 1318- Avg. Pages per Extent........................: 7.7- Scan Density [Best Count:Actual Count].......: 19.11% [252:1319]- Logical Scan Fragmentation ..................: 33.60%- Extent Scan Fragmentation ...................: 88.55%- Avg. Bytes Free per Page.....................: 3401.3- Avg. Page Density (full).....................: 57.98%
And after the DBREINDEXDBCC SHOWCONTIG scanning 'S_OPTY_X' table...Table: 'S_OPTY_X' (5835333); index ID: 1, database ID: 7TABLE level scan performed.- Pages Scanned................................: 1272- Extents Scanned..............................: 160- Extent Switches..............................: 159- Avg. Pages per Extent........................: 7.9- Scan Density [Best Count:Actual Count].......: 99.38% [159:160]- Logical Scan Fragmentation ..................: 0.00%- Extent Scan Fragmentation ...................: 62.50%- Avg. Bytes Free per Page.....................: 658.4- Avg. Page Density (full).....................: 91.87%
Reading BoL, I see you can use fillfactor. What is a fillfactor, and is there a standard on what to use?I'll stop there for now.THanks,TCG