I have a query that is taking a long time in the middle of a transaction. When I get the wait_type of the process it is PAGEIOLATCH_SH.
What does this wait type mean and how can this be resolved?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From Microsoft documentation:
In practice, this almost always happens due to large scans over big tables. It almost never happens in queries that use indexes efficiently.
If your query is like this:
, check that you have a composite index on
(col1, col_primary_key).If you don’t have one, then you’ll need either a full
INDEX SCANif thePRIMARY KEYis chosen, or aSORTif an index oncol1is chosen.Both of them are very disk
I/Oconsuming operations on large tables.