Skip to main content

All Questions

Tagged with
2 votes
2 answers
246 views

Why is Postgres execution plan changing vastly based on where condition

I am trying to execute the same SQL but with different values for the where clause. One query is taking significantly longer time to process than the other. I have also observed that the execution ...
ananda's user avatar
  • 179
0 votes
1 answer
1k views

SQL Server error - The SET SHOWPLAN statements must be the only statements in the batch

I am trying to generate a showplan table in SQL Server. I am getting this error when I try to do this Msg 1067, Level 15, State 1, Line 0 The SET SHOWPLAN statements must be the only statements in ...
SunnyBoiz's user avatar
  • 574
1 vote
1 answer
293 views

Why does the query planner start picking a worse plan after a certain number of joins inside a CTE?

I have the following query: EXPLAIN ANALYZE WITH up AS ( SELECT ua1.id ua1_id, gp1.id gp1_id, upai1.id upai1_id, upbi1.id upbi1_id, upiv1.id upiv1_id, vi.id vi_id, c.id ...
Daniel Rearden's user avatar
0 votes
1 answer
354 views

Oracle not using my bitmap indexes in my query

The test_data table I am using in my query can be generated as per the below code: DROP TABLE test_data; CREATE TABLE test_data ( random_value NUMBER, random_string VARCHAR2(20), ...
Javi Torre's user avatar
0 votes
1 answer
61 views

Mysql Query Optimization for this particular query

I am having a mysql query which is taking roughly 2.6s to execute. At first it was not using index. Now I added index to it. But still no improvements. Any suggestion on this: select posummary0_.id ...
Amimul Ehsan Rahi's user avatar
2 votes
2 answers
840 views

SQL Query Execution Plan Analyzer Tool [closed]

I am using RDS Aurora PostgreSQL and I am new in PostgreSQL. I have been trying to analyze Execution Plans for queries in PostgreSQL. I realized that manual audit on these plans take times, may need ...
ahmet gül's user avatar
2 votes
1 answer
1k views

SQL Server execution plan in XML for query is too large to be displayed or saved in full

I am trying to obtain the execution plan in XML for a large T-SQL query. I am able to run the query to obtain the execution plan. However, the resulting XML execution plan text is too long to be fully ...
Carlos Garcia-Vaso's user avatar
2 votes
2 answers
147 views

Identical SELECT vs DELETE query creates different query plans with vastly different execution time

I am trying to speed up a delete query that appears to be very slow when compared to an identical select query: Slow delete query: https://explain.depesz.com/s/kkWJ delete from processed.token_utxo ...
adjuric's user avatar
  • 270
1 vote
1 answer
2k views

How to avoid performance degradation when run query with cast in where clause?

I have a table with 2 varchar columns (name and value) and I have such a query: select * from attribute where name = 'width' and cast( value as integer) > 12 This query works but I suppose there ...
gstackoverflow's user avatar
1 vote
1 answer
874 views

SQL execution plan has sort

I'm using the AdventureWorks database, ran the below query: -- 9 select * from Production.ProductModel where not exists ( select 1 from Production.Product where Production.Product....
Paritosh's user avatar
  • 4,449
0 votes
1 answer
681 views

Explain plan hint details as plain text

I'm trying to learn how to force Oracle 18c to use a function-based index — by using a hint: --I've omitted the custom function and function-based index because it cluttered the question too much. --...
User1974's user avatar
  • 398
0 votes
0 answers
98 views

Insert of records into SQL Server is slow whereas select is quicker

I am trying to improve the performance of insert in SQL Server. INSERT INTO [dbo].[GroupCustomerAccountProductRebates]([GroupId],[GroupName],[ProductId],[ManufacturerProductCode],[ProductDescription],[...
john's user avatar
  • 119
0 votes
1 answer
1k views

Postgres query cost is higher but runs faster

Update on 2022-05-15 After running vacuum analyze, the query plans are below. For A query Nested Loop Left Join (cost=45913.11..496597.16 rows=10 width=128) (actual time=115.205..3068.596 rows=10 ...
pjr's user avatar
  • 67
2 votes
0 answers
108 views

Improve performance of SQL query

I have a slow performing query which I am at a loss on how I could make more efficient. SQL isn't my speciality, but currently this query is taking about 3 seconds on average to run. I've run an ...
pingu2k4's user avatar
  • 1,020
1 vote
1 answer
341 views

What the decimal number in seconds bellow the cost percentage means in the SQL Server Graphical Execution Plan?

The number is highlighted in the image below. It would be nice to have a reference to some Microsoft Doc explaining it as well.
João Pedro Gonçalves's user avatar

15 30 50 per page
1 2
3
4 5
36