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

sp_blitzcache - calculation for USERSTORE_TOKENPERM looks incorrect #2487

Closed
Mike-Vernon opened this issue Jul 21, 2020 · 3 comments · Fixed by #2495
Closed

sp_blitzcache - calculation for USERSTORE_TOKENPERM looks incorrect #2487

Mike-Vernon opened this issue Jul 21, 2020 · 3 comments · Fixed by #2495

Comments

@Mike-Vernon
Copy link

I think the division should be (pages_kb / 1024.0 / 1024.) >= 2. instead of (pages_kb / 128.0 / 1024.) >= 2. on this line of sp_blitzcache:

SELECT @user_perm_gb = CASE WHEN (pages_kb / 128.0 / 1024.) >= 2.

if you look at the calc for the older version of sql 11 lines down it is using 1024

Also, it is using 1024 for the same calc in sp_blitz first (

AND SUM(pages_kb) / 1024.0 / 1024.0 >= 1; /* At least 1GB RAM overall */';
)

@BrentOzar
Copy link
Member

Thanks for the bug report! I'll dig into it this week.

BrentOzar added a commit that referenced this issue Jul 31, 2020
On older versions of SQL Server, the calculation was incorrect. Closes #2487.
BrentOzar added a commit that referenced this issue Jul 31, 2020
…ORE_TOKENPERM

#2487 sp_BlitzCache USERSTORE_TOKENPERM
@BrentOzar BrentOzar added this to the 2020-08 Release milestone Jul 31, 2020
@BrentOzar
Copy link
Member

Thanks for catching that! I've made the change, and I'm sure it works beautifully even though I didn't test it. Merged into the dev branch, will be in the August release with credit for you in the release notes.

@Mike-Vernon
Copy link
Author

@BrentOzar - great, thanks for taking care of it! :-)

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

Successfully merging a pull request may close this issue.

2 participants