Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular Expressions to Generate Disable/Drop Index Scripts #1

Open
eliassal opened this issue Aug 13, 2024 · 1 comment
Open

Regular Expressions to Generate Disable/Drop Index Scripts #1

eliassal opened this issue Aug 13, 2024 · 1 comment

Comments

@eliassal
Copy link

Hi alevyinroc, I went through your post mentioned in the title which is very interesting, when I run the sp_BlitzIndex against any DB I don't get what you refer to

Reads: 5,692 Writes: 8,683,633 on: dbo.tablename.indexname (10)

Here is the PS code I used
Invoke-DbaQuery -SqlInstance SQL2K12 -Query "exec admin.management.sp_BlitzIndex @DatabaseName=StackOverflow2013,@Mode=4;" | Export-Excel -Path ~\Documents\IndexAnalysis.xlsx
I get
image

No records for read/writes as yours for the indexes, in which column "Reads: 5,692 Writes: 8,683,633 on: dbo.tablename.indexname (10)" this phrase should appear?
Thanks in advance for your help

@alevyinroc
Copy link
Owner

Thanks for reading!

You aren't seeing that note in the sp_BlitzIndex results because you don't have any indexes with a high write-to-read ratio in their current usage stats. Based on your other usage stats, that's likely because you recently restarted the instance, just restored the database, or restored the database but haven't done a lot of work with it since. This is one of the sp_BlitzIndex findings that really needs a lot of "soak time" to get an accurate picture of usage.

If you point sp_BlitzIndex at a database that's got higher traffic, on an instance that hasn't been restarted in a while (at least a week), you'll probably get more results, including the one you're looking for here.

I recommend that you update the First Responder Kit - your screenshot shows that you're running a 3 year old version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants