Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

proc taking long time to run on occasion. Same when run as script. Sometimes takes forever

$
0
0
I have a stored proc with no input params that does a select that sometimes takes 2 minutes and sometimes doesn’t end. On one of the long runs I checks to see what was holding it up and notices it had a RESOURCE_SEMAPHORE wait, Based on what I read this is related to memory pressure. It's currently doing 208 million logical reads. My question is the RESOURCE_SEMAPHORE more prevalent if the given query is deemed to need more memory? I think I know the answer however want to make sure. I rewrote the query and it now does 600k logical reads. Should I be concerned that this RESOURCE_SEMAPHORE wait will rear its ugly head? Was I getting that wait because other resources were hogging memory and this particular optimized proc was slated to take a large chunk of memory? Or is the amount of memory projected by this proc irrelevant and the RESOURCE_SEMAPHORE wait is strictly because of other processes trying to hog memory? I’m wondering if because I optimized the proc I won’t have to worry about this wait. Does anyone have experience w/ the RESOURCE_SEMAPHORE wait type?

Viewing all articles
Browse latest Browse all 6525

Trending Articles