Questions tagged [slow-query]

10 questions
10
votes
1 answer

Why is the 'DELETE' operation on a PostgreSQL database table unusually very slow?

I have encountered a significant performance issue when executing the 'DELETE' operation on a PostgreSQL database table. The execution time for deleting 15488 records was 79423.768 ms which is very slow compared to other operations like 'INSERT' or…
ShwetaJ
  • 153
  • 1
  • 8
3
votes
2 answers

Extra metadata in mysql slow query log - meaning of Id?

I'm running MySql5.7 with slow query logging enabled, and the log includes more metadata than is mentioned by the docs; these three lines are printed before each query: # Time: 2025-02-18T14:25:16.286041Z # User@Host: root[root] @ localhost [] Id:…
Vince Bowdren
  • 439
  • 2
  • 18
1
vote
0 answers

What is the text encoding of the MySQL Slow Query Log?

The documentation does not seem to contain the word "encoding", so I am looking for a reference on the encoding of the MySQL slow query log. Based on the slow query logs I have seen so far, my current guess is that it is ASCII rather than UTF-8, but…
merlin2011
  • 143
  • 5
1
vote
2 answers

Why is this query running so slowly?

My system (OpenMage / Magento 1) is running some queries like the following and even though it's not using any large tables it seems that they take an abnormally high amount of time to execute. Sometimes they take a few minutes, sometimes they will…
gabtzi
  • 181
  • 7
0
votes
1 answer

My postgresql indexes are read slowly from disk

I have a database of sufficient size that it does not fit entirely in RAM, including indexes that also exceed RAM capacity. When performing queries, I observe significant differences in processing time depending on whether the index needs to be read…
Doe Jowns
  • 131
  • 6
0
votes
1 answer

MariaDB: Writing even 25MB of data into a LONGBLOB is very slow

We recently added MariaDB as a storage option for our tool. Before that we only allowed sqlite. Among other tables I have a very simple temporary file storage table: create table tmp_file_storage ( uuid varchar(255) not null, …
Tekay37
  • 101
  • 1
0
votes
1 answer

Extremely slow query whenever using ORDER BY, even when an index is present

I've been trying to debug a particularly slow query that never completes (it takes forever and eventually timeout), and found out that it's down to the ORDER BY statement: if it's there, it never completes, if I remove it, it returns instantly. My…
laurent
  • 191
  • 2
  • 10
0
votes
0 answers

Sql Server migration from old server to new very slow SQLEXPRESS

Hope someone can assist me. I think I might know what the problem is but this is not really resolving the issue and was wondering if it is even a valid conclusion. I am not a Guru at all with SQL. Running windows sever standard 2019 OLD Server…
Eduard
  • 1
  • 1
0
votes
1 answer

Techniques for increasing speed of simple select query using DBI R package to MS SQL server where ASYNC_NETWORK_IO is the bottleneck

I am executing a simple select query similar to: DBI::dbGetQuery(db, "SELECT date, x, y, FROM table") where the table contains a large amount of financial data. The db is a MS SQL server that I manage. I noticed slow query times so dug into the…
nvt
  • 1
0
votes
1 answer

How can I speed up my query that involves `max(timestamp)` in a huge table? I already added an index to every field

I have a huge table that has fields ip, mac, and timestamp. Neither of the three fields is unique, but the combination of all three is. Table is automatically populated, with newer records added all the time. The field timestamp refers to when a row…