CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 23:43:11 GMT
content-type: text/html; charset=utf-8
cf-ray: 963f09dcfd3320c5-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=3ebff6d4-7d3e-4643-bb12-15ec8e1125ed; expires=Thu, 23 Jul 2026 23:43:11 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 768aa4bc-abe5-4b4c-96fb-426771ab1d60
x-worker-origin-response-time: 522000000
x-dns-prefetch-control: off
set-cookie: prov=3ebff6d4-7d3e-4643-bb12-15ec8e1125ed; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=KhHWuA03dKLdz_m4M0_PhIzBoBYF3BphohdGev5V.Gg-1753314191-1.0.1.1-qP89O2uYs72YeUOvBt0OjuTNgKvn71VffVNk6hM06GeBFhWHtcbmKJIZyEMTxex98ZVWyXT27GNpYpuMr0f4RlxG2MEpajrmB.4_55AfDQA; path=/; expires=Thu, 24-Jul-25 00:13:11 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=rREvW6yI7oXrKZDT5vw5YQEG0tqjzSFut5r8MEYocOM-1753314191412-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'execution-plan' Questions - Database Administrators Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [execution-plan]
The strategy selected by the query optimizer to process a query.
1,241 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
44
views
Postgres query planner join selectivity greater than 1?
I am using PostgreSQL 14.17.
I am trying to debug a query planner failure in a bigger query, but I think I've narrowed down the
problem to a self-join on a join table:
SELECT t2.item_id
FROM ...
1
vote
0
answers
21
views
Dynamic sampling works differently than documented
Dynamic sampling in Oracle versions 12c to 19 is documented as functioning the same if it is enabled via the init parameter or by hinting.
This does not seem to be true.
I have tested this in customer ...
0
votes
1
answer
86
views
Gather Streams plan operator bad performance
How to explain and troubleshoot the "final" Gather Streams query plan operator, which takes seconds, while the previous operators make it within one second?
These are the left-most plan ...
17
votes
1
answer
2k
views
Union does not always eliminate duplicates
I have the following query and expect that as a result I will have a list of IDs without duplicates. But sometimes it produces duplicates (1-2 on 4 million rows).
Why can it happen? I run it with the ...
0
votes
0
answers
62
views
Same query, different execution plan, massive runtime impact
We have a JavaEE application that calls a stored procedure (SP) for some kind of search form. It's a massive query utilizing multiple joins and conditions.
We now observed, that this SP seems to use a ...
0
votes
0
answers
40
views
Why does Postgres use filter instead of index scan when there are non-negligible number of null records?
This is my table:
learning_postgres=# create table r(id serial primary key, x int not null, y int);
CREATE TABLE
learning_postgres=# create index r_x_btree_idx on r using btree (x);
CREATE INDEX
...
10
votes
1
answer
483
views
Clustered Index Update operator performing excessive Logical Reads after query change
If I have the following query in the Stack Overflow2010 database
UPDATE dbo.Posts
SET Title =
CASE
WHEN CreationDate <= '2008-01-01T00:00:00'
THEN 'A'
...
3
votes
1
answer
242
views
Query runs faster with new plan but same old statistics
OK, this sounds like the standard My query was faster yesterday question. I hope it's not.
I have a query that usually runs within seconds (e.g. like 4 secs). Last night, it ran for 12 hours before we ...
17
votes
2
answers
2k
views
Unnecessary sort with TOP PERCENT?
Setup
-- Create a heap table of numbers from 1 to 100
SELECT TOP (100)
i = IDENTITY(int, 1, 1)
INTO #T
FROM master.dbo.spt_values;
-- Add a clustered primary key
ALTER TABLE #T
ADD PRIMARY ...
8
votes
1
answer
268
views
Order and nature of columns in select list of sorted UNION query affects performance
I am observing significant performance impact of select lists in sorted UNION queries.
The general form of UNION queries I am working with is:
SELECT * FROM (
SELECT <select_list> FROM <...
3
votes
1
answer
94
views
Postgres JOIN with a GROUP BY subquery optimization
I'm trying to optimize a PostgreSQL view that aggregates data from one table and then joins it with multiple other tables based on specific conditions. However, the execution plan isn't performing as ...
9
votes
3
answers
2k
views
Performance issues in parameterized queries accessing a view in SQL Server
I am currently facing an issue with parameterized queries in SQL Server that I do not understand where it is rooted in.
I broke it down to a simple example:
Let's assume a table that holds data about ...
2
votes
2
answers
133
views
Why does adding an extra value in the IN clause speed up this query?
I'm trying to understand why a specific query in MariaDB is running faster when adding more values in the IN clause. With more values in the IN clause, it would actually retrieve more data, yet the ...
1
vote
0
answers
295
views
why does the UnmatchedIndex warning appear in the execution plan, even though the index is being used?
so in AdventureWorks22, I created an index like:
create index IX_FirstName on Person.Person(PersonType,NameStyle)
where Firstname = 'Ken'
I wanted to see the error in the execution plan
so I declared ...
0
votes
0
answers
42
views
why i can't see the reason behind early termination in the XML?
I was running this query db fiddle
and in the XML I could not find the reason behind early termination
now when I used trace flag 8675 The output was:
End of simplification, time: 0.001 net: 0.001 ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
sql-server × 745
query-performance × 378
performance × 315
postgresql × 248
optimization × 166
index × 126
sql-server-2016 × 86
sql-server-2014 × 76
sql-server-2012 × 74
t-sql × 53
mysql × 49
oracle × 48
sql-server-2008-r2 × 46
statistics × 45
plan-cache × 40
sql-server-2019 × 40
index-tuning × 36
explain × 35
join × 33
sql-server-2008 × 33
azure-sql-database × 29
stored-procedures × 29
performance-tuning × 27
more related tags
Hot Network Questions
- What fiction genres do literary agents recognize?
- Is a Rakshasa Immune to True Strike?
- Is there a way to move the cursor specifically to the beginning of the visually selected region (not just toggle like `o`)?
- Will a restless MCU survive long enough?
- Is there a formal threshold for when a variable is considered 'random' in statistics? What is it?
- Why does the Bible says Adam was not deceived? Wasnt he deceived by Eve? According to 1 Tim 2:14?
- How should a typical reward curve look like while training a RL model
- Descriptive nouns omitting の?
- Expected Value of a Dice Product Game
- How Fill Date Series Without Formatting Using Keyboard Only
- Did Germany declare the Donetsk People’s Republic to be a terrorist organization, at some point?
- How to make peaks with thick lines pointy?
- How to handle missing weather data (predictors) in production time series forecast with Prophet?
- A complex polynomial inequality
- OId Movie about an alien city that plays a repeating melody
- How to expand an algebraic function like √R(x) into a continued fraction in Mathematica?
- Distance of superdense color code circuits
- Processing All Files [0-9]*tex
- multlined: not aligned with the norm
- At Helsinki airport, connecting from Schengen to non-Schengen flight, is there exit immigration?
- Distance Between Subspaces
- In QGIS installed via OSGeo4W on Windows 11, what is the path to the command history file for the Python console?
- A word that describes some people
- Why is my gooseberry jam so stiff?