I'm checking out a query which exhibits strangely inconsistent performance.
Using SolarWinds DPA, I can see that the query sometimes uses a Table Spool, sometimes it doesn't.
When it actually used a Table Spool, the query's performance seemed to tank (wait time increased significantly compared to when Table Spool is not used).
See below figure:
- Plan #4681967514 has a Table Spool step
- Plan #4038619871 does NOT have a Table Spool step
Can you provide a guide, a hint on why the exact same query produced wildly different execution plans like this case?
Note: I've pastebinned the query in Chop: http://ift.tt/1uPBIM6
Aucun commentaire:
Enregistrer un commentaire