CARVIEW |
Select Language
HTTP/2 200
date: Fri, 25 Jul 2025 00:42:12 GMT
content-type: text/html; charset=utf-8
cf-ray: 96479dae0e90c1b3-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=2a9cb379-ea19-40dd-9e87-544f3a2b293d; expires=Sat, 25 Jul 2026 00:42: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: 0b532e22-9e4a-4207-81cb-a6fa411e80e0
x-worker-origin-response-time: 555000000
x-dns-prefetch-control: off
set-cookie: prov=2a9cb379-ea19-40dd-9e87-544f3a2b293d; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=N20Qv0xMdv6OM9uOlApaX154sAdddNjAztktxnSiARQ-1753404132-1.0.1.1-jrNIE9TPyF.y6q9xG9BfxU.CQ9Nsse3B0649Dfvbg9hcqWGKzPAfA4eYl8gg2WCOpscfOSS09mTz_F6tKMM7CxHUMLXmLT2Uw9iJZJOYgtQ; path=/; expires=Fri, 25-Jul-25 01:12:12 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=bWYE6VYAuZzasM_T1jcx6V_ZmqyKQJ4_Ozsk._8El84-1753404132094-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
45
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
22
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
- Is it okay to email researchers if I’m just a high school student?
- Which workflow is more effective: worldbuilding before plotting or the other way around?
- Expected Value of a Dice Product Game
- Is buying random stocks and then selling off the ones that go down a good way to reduce capital gains tax?
- Macro Definition Outside Current Group
- Early 70s scifi novel about underground people, caste is determined by the color of your poncho, and everyone eats mouldy grain
- Distance of superdense color code circuits
- spots / stains on tubeless tire
- Most practical way to determine concentration of reducing sugar in frozen French fries?
- Why is the Schrödinger wave equation totally different from the classical wave equation?
- How much time should I take for "self transfer" without checked-in baggage?
- When was the last time all alive humans stayed on earth?
- Did Denmark report that 64% Palestinian refugees from 1992 received serious fines or jail time?
- Can waves be seen?
- Do standing sound waves sound different?
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Distribution of a dot product of multinomial variables
- Why were two 2x6 boards installed on top of a window rough sill?
- MATCH issue across multiple tabs - floating point, INDIRECT
- Have philosophers ever defined a notion of "luck" or "surprise" that is separate from probability?
- Mars colony book I read in the 80's. The name?
- Why is Shunt Voltage Reference (LM4040DBZ-3) Not outputting a stable 3V supply
- Early Sailing days in September 1066... Could Harold defeat William at Hastings, if it happened before Stamford Bridge?
- Tracking stored proceduers performance