All Questions
Tagged with query-performance or query-optimization
10,924 questions
0
votes
0
answers
5
views
Parse spark execution plan to find predicates and realted base tables
Is there any tool to parse spark execution plan to find out the predicates used in the queries and find the base tables on which the predicates are filtering.
1
vote
1
answer
40
views
How to use index to search if trim is used in search value
My Postgres 17 database has a large table with 245 columns containing an indexed column ribakood:
CREATE TABLE firma2.toode
(
...
ribakood character(20) COLLATE pg_catalog."default",
...
...
-1
votes
1
answer
38
views
Nested Loop Join - How to resolve [closed]
I have a query that is continually running extremely slowly due to a nested loop join. I am joining a table of customer data to a calendar table that contains dates, week, quarter and year values. The ...
-1
votes
0
answers
74
views
Postgres query optimization partial indexes [closed]
I am querying news database (postgres + pg_vector) and want it to be fast. Due to being news database I am interested only in last day queries and new data comes in all the time.
I have some basic ...
0
votes
0
answers
42
views
why using curdate in mysql takes longer than using between [duplicate]
I have query mysql like this
SELECT outpatients.OutpatientID AS ID, FLOOR((CURDATE() - patients.DateOfBirth)/10000) AS age,
from outpatients
LEFT JOIN patients ON outpatients.PatientID = patients....
1
vote
3
answers
136
views
SQL Server select query where clause
Evaluating one side of OR in my query. I have a SQL Server query with 2 separate complex filters. The intention to combine them in one as follows:
Declare @BoolSet Bit = 0
Select Distinct Top (1200)
...
0
votes
0
answers
31
views
How to optimize a Starburst/Presto query that joins on two different keys without reading the same table twice?
I'm using Starburst (Presto) to query a large trip dataset (trip_data) from S3. I have a list of users (user_id) coming from a Kafka table (kafka_table), and I want to join this with trip data from ...
-1
votes
4
answers
55
views
Does PostgreSQL optimize the data transfer for cross product results?
Background: I'm using Doctrine ORM with a PostgreSQL database. To eliminate an N+1 problem I had to add a lot of left joins to my query.
Which results me in joining a very small result set with a very ...
0
votes
1
answer
61
views
Azure SQL SELECT columns INTO #Temp table very slow
Azure SQL SELECT of columns INTO #Temp table is executing very slowly. If I remove the INTO clause, it executes in 20 seconds instead on 10 minutes.
Kindly suggest, how do I optimize this query? ...
0
votes
0
answers
71
views
Very slow query on TimescaleDB when retrieving latest values
I am testing a Timescale DB for a migration, and there is a query which is very slow depending on the time range, when using m.ts >= '2019-07-03 11:50:00+00' the query takes 1m30s (!), but with m....
-1
votes
1
answer
18
views
MariaDB 10.3 Semijoin very slow with large table and IN queries [closed]
I am using MariaDB server 10.3 and queries with large IN (1000 values) on a large table were very slow (10 minutes) compare to the same database running on mysql 5.5 engine(0.5sec).
1
vote
0
answers
56
views
Why would SQL Server not use a Merge Join (Concatenation) operator on non-unique, but pre-sorted values? [migrated]
I have a very simple query where I use a UNION ALL + ORDER BY over two queries that return pre-sorted data from respective indexes. For some reason, SQL will not use a Merge Join (Concatenation) for ...
0
votes
0
answers
44
views
Is there a way to "Eager Load" entire models from (cached) files, so database not is asked and yet they work with relations as intended?
I work with Laravel 12 in a browser based game evironment with a lot of tables just containing basic/static data. Most of the time that is pretty convenient as you can do lots of game design changes ...
3
votes
1
answer
49
views
Postgresql delay in queries using wildcard '%searchTerm%' in large set database
Currently, I have the follow real use case challenge.
Library admins want to search for books in their library database using book and category names. Their database has over 2 million book records, ...
0
votes
0
answers
42
views
postgresql performance query
This is my query in Postgres:
SELECT DISTINCT ev_concept.concept_id AS concept_id, ev_concept.concept_code AS ev_concept_concept_code, ev_concept.concept_name AS ev_concept_concept_name, ev_concept....