Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

PWAIT_MD_RELATION_CACHE and MD_LAZYCACHE_RWLOCK

$
0
0

Last night I started running a script to compress tables (page compression) in my database.  We are on SQL Server 2012 SP1 running HADRON and using CDC.  The script started off seemingly fine and several small tables and about 5 minutes later, we noticed that the server started timing out connections.  I killed my script, which was in the process of running :

ALTER TABLE xxxx REBUILD PARTITION = ALL  
WITH  
   ( 
      DATA_COMPRESSION = PAGE,  
      ONLINE =  
   ON 
   )

This is a big table that we have cdc enabled for.  I killed my script, and we continued to see terrible performance across the board, with all queries waiting on PWAIT_MD_RELATION_CACHE and MD_LAZYCACHE_RWLOCK wait types.  Connections were timing out to the point where we couldn't access anything.  At that point, we performed a manual failover to our secondary and a few minutes later, everything successfully came up on the secondary and performance was fine.

I have searched the web for the listed wait types, but I don't see any info on them.  At this point, how should I proceed?  I would really like to get compression in place, but I obviously can't perform this online.  Is there a bad interaction between CDC and altering a table with compression?  Like every row being altered is creating a new CDC record or something?

Any info would be much appreciated.

Let me know if I can add any other info.

Thanks!

-Bill S.


Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>