January 7, 2019 at 3:12 am
Hello,
I'm finding one particular table with very high CPU usage. This table has ROW level compression.
Does anyone know a way to calculate the uncompressed size?
I have found lots of ways to ascertain the saving by compressing and have been BINGing every search I can think of.
Thanks in advance.
January 7, 2019 at 4:25 am
Brilliant thanks. Worked a treat
January 7, 2019 at 4:29 am
cheers, happy to help! 🙂
January 7, 2019 at 4:33 am
phil.martin 65477 - Monday, January 7, 2019 4:25 AMBrilliant thanks. Worked a treat
So you're saying that going from Row Compression to No Compression improved performance? Or are you just saying that Glenn's code worked well in discovering the estimates?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 7, 2019 at 4:38 am
Glenn's code worked well in determining the uncompressed size. We have plenty of disk space so I'm going to remove the compression and see if it does improve CPU usage. I'll post when I find out.
January 7, 2019 at 7:41 am
phil.martin 65477 - Monday, January 7, 2019 4:38 AMGlenn's code worked well in determining the uncompressed size. We have plenty of disk space so I'm going to remove the compression and see if it does improve CPU usage. I'll post when I find out.
Thanks for the feedback, Phil. It's a unique opportunity to find this type of information out and so would love to hear what you find after uncompressing the table.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 7, 2019 at 7:55 am
While there is some marginal CPU overhead, from what I've seen, data compression actually doesn't explain high CPU utilization.
If you havn't done this already, I'd suggest confirming if it's mssql cpu usage versus system usage, and then narrow it down to a specific database and top x cpu intensive queries. See if these queries are all referencing this table in question and also rule out whether specific sql operations like type conversions are causing the issue.
This msdn article by Don Castelino explains how to methodically diagnose what's consuming your CPU.
https://blogs.msdn.microsoft.com/docast/2017/07/30/sql-high-cpu-troubleshooting-checklist/
"Do not seek to follow in the footsteps of the wise. Instead, seek what they sought." - Matsuo Basho
January 7, 2019 at 8:09 am
The table in question has 30million rows and is almost 500GB in size (compressed). It has constant UPDATEs and DELETEs. Having performed other due dilligence it's worth removing the compression as a test.
Thanks
January 7, 2019 at 11:39 am
phil.martin 65477 - Monday, January 7, 2019 8:09 AMThe table in question has 30million rows and is almost 500GB in size (compressed). It has constant UPDATEs and DELETEs. Having performed other due dilligence it's worth removing the compression as a test.
Thanks
Unless you're including all indexes in that, that means that each row contains more than 16KBtyes. Can you post the CREATE TABLE statement for the table? I believe I may know a part of the problem but need to see the DDL for the table before I open mouth too much. Even if what I suspect isn't the problem, there are some things I might be able to help you with that will benefit the performance of all queries with changing the basic DDL for the table (PFM :D)
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply