New answers tagged

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 ...
user avatar
  • 69.4k
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 ...
user avatar
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 ...
user avatar
  • 32.6k
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 ...
user avatar
  • 69.4k
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, ...
user avatar
-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,...
user avatar
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. ...
user avatar

Top 50 recent answers are included