March 3, 2022 at 9:35 am
Hi,
Is there a reason for having different query_ids for same SP/query from Querystore.
I understand that for each query id, there could be different plans (plan_ids), we will have an option to pin one plan for the query_id in Querystore. But for same stored procedure, there were different queryids (from sys.query_store_plan & sys.query_store_query). I wasnt able to force an execution plan.
can anyone help me understand on how it can have multiple queryids for same query.
March 3, 2022 at 10:01 am
Different connection settings? (ansi nulls, ...)
March 3, 2022 at 10:17 am
Thanks for the reply, There's only one connection string.
All the connections are only coming thru app and settings should be consistent for all the sessions.
March 3, 2022 at 2:38 pm
Check all the settings as suggested. Maybe an application server is misconfigured and using different ANSI settings. Look at the query_hash values to make sure they're the same. Normal behavior, with everything being truly identical, you won't see this. So, something is off. Go and look for it. Don't assume.
----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply