New answers tagged

0 votes

How can I optimise this MySQL query?

Use SHOW CREATE TABLE reminders to present the table. Use text, not images to provide information to us. Use a numeric datatype, perhaps BIGINT in your case, for a column that will be compared against ...
user avatar
  • 68.7k
0 votes

Disk Response time high on Tempdb

After spending many days and involving other teams (VM,Windows and Storage),we noticed in the VM Center that the Disk Consolidation pending on the VM( db server). after performing the Disk ...
user avatar
-2 votes

Performance issues on a MySQL database with 150 million rows

You can perform a couple of optimization techniques before importing data that might reduce the overall processing time like disabling the indexes temporarily or partitioning the table. But all these ...
user avatar
0 votes

Force stable postgres function to be executed once

Drastically increasing the function cost will generally make the planner pick the plan which it thinks will evaluate the function least, from the universe of all plans it considers. But it does not ...
user avatar
  • 32k
0 votes

Force stable postgres function to be executed once

If you think the query optimizer get things wrong, then using PL/pgSQL language to do queries step by step may help. And you can cache function results with variables. create function f1(<...>) ...
user avatar
  • 159
0 votes

Different DTU - Service tier between Master and Replica azure database

That depends on the purpose of the replica. If it's there to provide high availability, after the failover it won't be able to support the same workload as the primary.
user avatar
  • 21.5k
2 votes

Why is this simple query making up 50% execution time?

With the right indexes (you haven't told us what indexes the other table has) you could get this to be efficient by writing the query this way: SELECT whatever FROM "auth_user" where "...
user avatar
  • 32k
0 votes

Agregation group by date or group, pair index, MySQL, slow response

For your 'simple aggregation' queries, consider changing WHERE date_to >= '2021-05-20 10:01' AND date_to <= '2022-05-30 23:45' to WHERE date_to BETWEEN '2021-05-20 10:01' ...
user avatar
  • 1,599
1 vote

Agregation group by date or group, pair index, MySQL, slow response

That's one month's worth of data? Are you having any trouble with 20K inserts every 15 minutes? (I would expect not.) The table can be shrunk: ad_group_name_id probably does not need to be a 4-byte ...
user avatar
  • 68.7k

Top 50 recent answers are included