OloladeShelle
Level 2
Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Inappropriate Content
02-05-23
06:53 PM
Status:
New
We noticed the following SQL query runs which causes a block on the Blue prims database and causes performance issues:
SELECT count(*) as TotalItems FROM BPVWorkQueueItem i LEFT JOIN BPVSessionInfo s ON i.sessionid = s.sessionid WHERE i.queueid=@queueid AND (i.keyvalue is null OR i.keyvalue like @itemkey) AND i.state in (1,3)
Our suggestion: Consider using SELECT COUNT(1) to just count the number of records. This will give you the same results much faster without the unnecessary reads
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.