Execution-Plan

Tag: execution-plan

How to Find Queries Using an Index (and Queries Using Index Hints)

How to Find Queries Using an Index (and Queries Using Index Hints)

on January 24, 2017

Sometimes you know a query is out there, but it’s hard to find the exact query.

SQL Server stores query execution plans in cache, but it can be difficult to query the XML it stores. And there’s always a chance that the query plan won’t be there, due to memory pressure, recompile hints, or the plan cache being cleared by setting changes or other administrative actions.

Continue reading

How to Tune Indexes for a Stored Procedure

How to Tune Indexes for a Stored Procedure

You’ve got an important stored procedure that you think needs index help– but it runs in environment with lots of other queries. How do you focus in and discover exactly what indexes need tuning for that procedure?

Continue reading

Filling in Data Potholes Redux: Tally Tables vs CTEs

Filling in Data Potholes Redux: Tally Tables vs CTEs

on January 4, 2011

In A Previous Installment… our heroine (that’s me) rediscovered CTEs, specifically in the recursive style. That was in my post “Filling in Data Potholes with Recursive CTEs.”

Continue reading

SQLPASS Day 2- Optimization Timeouts and All about TLogs

SQLPASS Day 2- Optimization Timeouts and All about TLogs

on November 5, 2009

SQLPass unfortunately can’t last forever, but happily it’s still going strong. Here’s some highlights from my Day #2.

Continue reading

SQL PASS Day 1: To Free or Not To Free the Proc Cache?

SQL PASS Day 1: To Free or Not To Free the Proc Cache?

on November 4, 2009

Yesterday was day 1 of SQL PASS 2009. I am attending a variety of sessions on execution plans this year, and along the way I heard three very different opinions yesterday on managing the procedure cache in presentations.

Continue reading

Who is using space in tempdb, and what is their execution plan?

Who is using space in tempdb, and what is their execution plan?

on August 27, 2009

Sometimes tempdb is filling up. Sometimes I just want to monitor the amount of tempdb and check out execution plans of heavy tempdb users while watching performance on a server.

Continue reading

How Stale are my Statistics?

How Stale are my Statistics?

Update: improved/more recent version of queries for this are here.

It can be pretty difficult to manage statistics in data warehouses, or even OLTP databases that have very large tables.

Continue reading