New answers tagged optimization
0
votes
MySQL - Optimize select with join to a large table
Countries have standard 2-letter abbreviations. Use them rather than having to look them up. This would eliminate the JOIN and probably make the query faster.
If you need other columns from either ...
0
votes
Optimise query for fetching data across multiple days in a partitioned table
I did not retest with Postgres 14 or 15, but with earlier versions, the fastest possible way for this kind of query is to split it up into separate queries on partitions directly and UNION ALL.
SELECT ...
1
vote
Optimise query for fetching data across multiple days in a partitioned table
Your standards are very high here and might not be attainable.
As your date range increases, you get less and less benefit from partitioning by date. Indeed, it might already be counterproductive, as ...
1
vote
Imporve MySQL InnoDB Full-text Search Performance
The more words you have in the string, the more rows will match. This means more rows to score and sort.
I tried a similar test; it returned more than half the rows.
Then I changed it this way:
Got ...
0
votes
Query optimization [Oracle DBMS]
Try this one:
SELECT
MAX(req.CREATE_DATE) KEEP (DENSE_RANK FIRST ORDER BY req.CREATE_DATE DESC) CREATE_DATE,
MAX(req.column_x) KEEP (DENSE_RANK FIRST ORDER BY req.CREATE_DATE DESC) column_x,
...
-1
votes
Query optimization [Oracle DBMS]
hi you must see this checkmarks for optimum queries:
The more of the following criteria your query has, the more likely of a candidate it should be to run at night:
Selecting from large tables (>1,...
2
votes
Accepted
Is a correlated function in the FROM clause executed for every row?
NO, Postgres typically does not evaluate the function in the LATERAL subquery for all rows.
It will apply simple filters on big_table first and execute the function only for rows still in the race.
...
Top 50 recent answers are included
Related Tags
optimization × 1902mysql × 700
performance × 612
sql-server × 516
query-performance × 461
postgresql × 342
index × 201
execution-plan × 157
database-design × 95
join × 80
innodb × 78
oracle × 77
index-tuning × 61
sql-server-2012 × 60
mariadb × 56
postgresql-performance × 56
subquery × 53
sql-server-2014 × 50
query × 50
sql-server-2016 × 48
t-sql × 45
sql-server-2008-r2 × 37
mysql-5.5 × 36
mysql-5.6 × 35
mysql-5.7 × 34