Skip to main content

All Questions

0 votes
1 answer
45 views

Why is this Postgresql UPDATE statement so slow even when it doesn't update any rows? [closed]

I see that a full table scan is planned, however it's never executed and the UPDATE takes a long time anyway. Why?? Here's the EXPLAIN output Update on public.hone_cohortuser (cost=3180.32..8951.51 ...
Marcos's user avatar
  • 1,335
0 votes
1 answer
111 views

Using LIMIT makes query much slower - optimiser moves ORDER BY

I have the following query, which runs slowly: SELECT l.track, r.rating FROM library l LEFT JOIN rating r ON r.type='song' AND r.id=26452 AND r.value=CONCAT(l.name, ':', l.path) WHERE l.id=26452 ...
Dan Gravell's user avatar
  • 8,140
0 votes
3 answers
372 views

How to improve slow query performance?

I have a multi-join query that targeting the hospital's chart database. this takes 5~10 seconds or more. This is the visual expain using mysql workbench. The query is below. select sc.CLIENT_ID as '...
Cho's user avatar
  • 163
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
0 votes
2 answers
189 views

Read execution plan in Oracle

my question is why there is the full access in the option however I create two index for LIGPOR and DATRAI tables ?? and if there is any one can help me to clearly read the long execution plan in sql ...
Ora_as's user avatar
  • 1
1 vote
2 answers
1k views

Improving the query processing performance of SUM and JOIN SQL

SELECT SUM(C_QUANTITY) FROM CARS JOIN ORDERS ON C_ORDERKEY = O_ORDERKEY; I have this query that aggregate sum of L_QUANTITY from the JOIN tables. The query cost, by using EXPLAIN PLAN is 12147. The ...
Sunny J's user avatar
  • 47
3 votes
2 answers
2k views

Performance impact of view on aggregate function vs result set limiting

The problem Using PostgreSQL 13, I ran into a performance issue selecting the highest id from a view that joins two tables, depending on the select statement I execute. Here's a sample setup: CREATE ...
Dominik's user avatar
  • 1,702
1 vote
1 answer
58 views

Performance issue while Update remote database from local database

I tried to update remote table(dblink) from local database through trigger. I costs around 24990. Table data count nearly 3032965. UPDATE remote_table SET ip_stats = ( CASE WHEN :NEW.ip_stats ...
Nvr's user avatar
  • 171
0 votes
1 answer
683 views

Execution plan different on same db in two instance

I am struggling with a mysterious problem: I have a query in production that dropped his performance dramatically, taking from a few second to two minutes. By analyzing the execution plan, I found ...
Matt's user avatar
  • 9
0 votes
0 answers
108 views

Azure Managed Instance Same Query in Row / Batch Mode running in very similar times. Why isn't Batch Mode Running Faster?

Azure Managed Instance Same Query in Row / Batch Mode running in very similar times. Why isn't Batch Mode Running Faster? The way I got the Row Mode is running under a database context of ...
Gokhan's user avatar
  • 279
0 votes
0 answers
54 views

MySQL Common price from previous 10 days vs current price - MySQL Performance Improvement

I am casually building a website using phpMyAdmin and have created the below SQL code to get the most frequent price from the previous 10 days and compare it to the current price to identify price ...
lathb's user avatar
  • 1
1 vote
2 answers
1k views

What is SYS_OP_UNDESCEND and SYS_OP_DESCEND in Oracle Explain Plan?

I have an Oracle explain plan that looks like this: Plan hash value: 2484140766 ...
fozzy_bear_waka_waka's user avatar
0 votes
0 answers
290 views

SQL Warning INSERT INTO %%bmk%%

I have warning on my execution plan: insert [#TABLE] select *, %%bmk%% from [#TABLE] <Warnings> <MemoryGrantWarning GrantWarningKind="Excessive Grant" RequestedMemory="...
PhinéMu's user avatar
0 votes
1 answer
482 views

Performance of query with lower cost

I'm trying to optimize a select statement, but it seems the more it decreases in cost, the longer it runs. What is going on here? I can add a filter on partition_type which drastically reduces the ...
Ronald's user avatar
  • 172
0 votes
1 answer
92 views

Vast Difference In Query Execution Using Identical Plan

I'm not a DBA, so I will try to explain this as best as I can. We are trying to figure out why some queries seem to execute super quick and other times not. The query itself does not vary, nor does ...
codemann8's user avatar
  • 380

15 30 50 per page
1
2 3 4 5