Category "query-optimization"

Subquery function invoked twice if alias is used in main SQL

I'm trying to understand how Oracle processes SQL's to study ways of optimizing complex SQL's. Consider the test function below: CREATE OR REPLACE FUNCTION FCN_

mysql with date function query running slow

I found something weird while executing query today and i want to know how this happens. Below is my query: select sum(price) as total from table_a where test

Query Slower with different value for a parameter postgress

I´m with an issue where hibernate generates the following query on an existing view. select count(proclistvw0_.proc_id) as col_0_0_ from proc_list_vw

Bigquery An internal error occurred and the request could not be completed. Error: 60909208

I'm trying to run the following query but it keeps throwing this error after it keeps running for around 1 to 2 hours An internal error occurred and the reques

PostgreSQL Nested Loop Join Performance

I have two tables exchange_rate (100 Thousand Rows) and paid_date_t (9 million rows) with below structure. "exchange_rate"

How to improve an Update query in Oracle

I'm trying to update two columns in an archaic Oracle database, but the query simply doesn't finish and nothing is updated. Any ideas to improve the query or so

PostgreSQL 13 - Performance Improvement to delete large table data

I am using PostgreSQL 13 and has intermediate level experience with PostgreSQL. I have a table named tbl_employee. it stores employee details for number of cust

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) (a

Hibernate 5 Native query support - Slow response generation

I am trying to fetch 1000 rows using the Hibernate createNativeQuery. The query contains two joins. When I execute the same in SQL developer I see that response

Finding blocking/locking queries in MS SQL (mssql)

Using sys.dm_os_wait_stats I have identified what I believe is a locking problem wait type waittime pct running ptc LCK_M_RS_S 2238.54 22.14