New answers tagged

0

for grins give this a try `> is changed to >= so not exact same query SELECT TOP 1 subscription_id FROM subscription AS sub JOIN billing_info AS bi ON bi.billing_info_id = sub.billing_info_id JOIN person_group AS apg ON apg.person_id = bi.person_id AND apg.group_id = @Id AND apg.start_date < GETDATE() ...


12

If you can't change the query you can use a plan guide. Test the performance of the query with OPTION (QUERYTRACEON 4138) (will need someone with sysadmin permissions to try this). If that produces satisfactory performance you can apply this with a plan guide. If it doesn't produce satisfactory performance try and find a hint that does. Possibly OPTION (...



Top 50 recent answers are included