Script Question

  • My goal is to find the sample rate used on a given index for checking purposes. I have not been able to find a script to do that. If anyone knows of a script or where to find that in the system tables/DMV's, I would appreciate it.

    So my next idea was to pump the output from DBCC SHOW_STATISTICS into a temp table or table variable to get the sample rate, but that fails because this DBCC actually outputs three tables.

    So my next question is:

    What is the command that lets you pick which table you want to look at? I want to use only the first table from DBCC SHOW_STATISTICS command for example.

    Any help is much appreciated...

  • edit: i lied, apparently there is now:

    dbcc show_statistics ("HealthCheck", "idxTime") WITH STAT_HEADER

    This will return just the top section. You can set that up with an insert into exec ('') loop.

  • Nice!

    Thank you.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply