steps of a sql

Поиск
Список
Период
Сортировка
От PegoraroF10
Тема steps of a sql
Дата
Msg-id 1569620584962-0.post@n3.nabble.com
обсуждение исходный текст
Ответы Re: steps of a sql
Список pgsql-general
Some days ago one of my customers claimed that one of his queries were
spending too much time. Then on postgres log it appears really strange. That
query doesn´t usually appears as parse, sometimes only as execute, because
it tooks almost all times less than 500ms. But on that day something
happened, what was that, PARSE time of 10 minutes ?

Command_Tag  Message
PARSE              duration: 552607.263 ms  parse PRSTMTST13817971293: WITH
...
SELECT            duration: 1211.195 ms  execute
PRSTMTST13955596862/PORTALST13955596862: WITH  ...
PARSE              duration: 673398.585 ms  parse PRSTMTST13857292877: WITH
...
SELECT            duration: 2742.588 ms  execute
PRSTMTST13817971293/PORTALST13817971293: WITH  ...
SELECT            duration: 1318.766 ms  execute
PRSTMTST13844185613/PORTALST13844185613: WITH  ...

Then, I didn´t find in the docs what are the steps of execution of a query
and obviously why that SQL took so long. These 5 examples are the same
query, so it doesn´t make sense that I´ll wait 10 minutes do parse and just
1 or 2 seconds to execute. So, the quetion is, how can I know if I´m running
a simple query or a extended query, like the docs explain on
https://www.postgresql.org/docs/11/protocol-flow.html and what can I do to
find what happened and solve to never occur again.



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: "Failed to connect to Postgres database"
Следующее
От: PegoraroF10
Дата:
Сообщение: Re: Operator is not unique