Answer the question
In order to leave comments, you need to log in
How to reduce request processing time?
Good time dear!
Please tell me what could be the problem and where to dig.
1. There is a table with 400,000 rows
2. There is such a query:
SELECT t.[id],t.[is_c],t.[mobile_p],t.[external_u],t.[spots],t.[state_id],t.[state_date],t.[max_state]
FROM [c] AS t WITH (NOLOCK)
WHERE t.external_uids.exist( 'external_uids/external_uid/uid[.=(.......) = 1
ORDER BY [id] OFFSET 0 ROWS FETCH NEXT 100 ROWS ONLY
Answer the question
In order to leave comments, you need to log in
I have vague doubts that the problem is somewhere here:
WHERE t.external_uids.exist( 'external_uids/external_uid/uid[.=(.......) = 1
t.external_uids.exist( 'external_uids/external_uid/uid[.=(.......) = 1 looks like xpath - instead of using hash join bk or something, there is probably an expensive per-record lookup. table and use it
Please provide a query plan.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question