Tuesday, April 17, 2018

Execution Plan Shortcoming in Extended Events

DZone Database Zone
Execution Plan Shortcoming in Extended Events
Execution Plan Shortcoming in Extended Events

I use Extended Events almost exclusively for capturing query metrics. They are the most consistent and lowest-cost mechanism for getting the time and resources used by a query. They can be filtered, combined with other events... they're just marvelous... until you capture an execution plan.

Execution Plans in Extended Events

Don't get me wrong. Capturing execution plans with Extended Events is the way to go if you're attempting to automate the process of capturing plans on specific queries on an active system. It's Step 2 that bugs me. So, we capture the plan. Here's an example script. Captures all the various plans and the batch and puts 'em together using causality tracking:

No comments:

Fun With SQL: Functions in Postgres

DZone Database Zone Fun With SQL: Functions in Postgres In our previous  Fun with SQL  post on the  Citus Data  blog, we covered w...