All Questions
Tagged with sql sql-execution-plan
535
questions
4
votes
4
answers
6k
views
How accurate is Oracle's EXPLAIN PLAN?
Are there any good ways to objectively measure a query's performance in Oracle 10g? There's one particular query that I've been tuning for a few days. I've gotten a version that seems to be running ...
55
votes
6
answers
139k
views
Measuring Query Performance : "Execution Plan Query Cost" vs "Time Taken"
I'm trying to determine the relative performance of two different queries and have two ways of measuring this available to me:
1. Run both and time each query
2. Run both and get "Query Cost" from the ...
2
votes
7
answers
2k
views
Stored Procedure Execution Plan - Data Manipulation
I have a stored proc that processes a large amount of data (about 5m rows in this example). The performance varies wildly. I've had the process running in as little as 15 minutes and seen it run for ...
4
votes
6
answers
6k
views
Different Execution Plan for the same Stored Procedure
We have a query that is taking around 5 sec on our production system, but on our mirror system (as identical as possible to production) and dev systems it takes under 1 second.
We have checked out ...
26
votes
9
answers
13k
views
Performance of SQL "EXISTS" usage variants
Is there any difference in the performance of the following three SQL statements?
SELECT * FROM tableA WHERE EXISTS (SELECT * FROM tableB WHERE tableA.x = tableB.y)
SELECT * FROM tableA WHERE EXISTS ...
7
votes
2
answers
7k
views
Different execution plan when executing statement directly and from stored procedure
While developing a new query at work I wrote it and profiled it in SQL Query Analyzer. The query was performing really good without any table scans but when I encapsulated it within a stored procedure ...
13
votes
1
answer
2k
views
Any guides on learning how to interpret a SQL query's Execution Plan in SQL Server 2005? [closed]
Is there any good article, tutorial or similar references on interpreting the Execution Plan of a query in SQL Server 2005?
3
votes
1
answer
3k
views
SQL Server - Query Execution Plan For Conditional Statements
How do conditional statements (like IF ... ELSE) affect the query execution plan in SQL Server (2005 and above)?
Can conditional statements cause poor execution plans, and are there any form of ...
22
votes
8
answers
11k
views
Will my index be used if all columns are not used?
I have an index on columns A, B, C, D of table T
I have a query that pulls from T with A, B, C in the WHERE clause.
Will the index be used or will a separate index be needed that only includes A, B, ...
93
votes
11
answers
65k
views
How do you interpret a query's explain plan?
When attempting to understand how a SQL statement is executing, it is sometimes recommended to look at the explain plan. What is the process one should go through in interpreting (making sense) of an ...