T
T
Tayrus02022-04-13 11:05:26
PostgreSQL
Tayrus0, 2022-04-13 11:05:26

Why is query runtime so large compared to execution time and planning time?

6256838b4ebe9295492901.jpeg

I did explain analyze of my query, it shows: scheduling time 0.196ms and execution time 0.072ms in total is 0.268ms but why do I show total query runtime as much as 2 seconds? Moreover, I took measurements in the application itself and sometimes the response time reaches up to 2s, although basically the request is executed to the application in 0.3s, but sometimes it jumps up to 2s and 4s, maybe, why is that? Iron is not the weakest, 128 RAM, 64 cores, 14 version of postgresql, ubuntu20

The request itself

SELECT blacklisted_id FROM blacklist_persons WHERE user_id = $1 AND place = $2 AND blacklisted_id = $3 LIMIT 1

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question