Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Дата
Msg-id e0320ffa-97ac-5976-ea76-2b9e87dd054c@iki.fi
обсуждение исходный текст
Ответ на Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Список pgsql-hackers
On 23/02/2023 13:20, Peter Eisentraut wrote:
> On 22.02.23 19:14, Heikki Linnakangas wrote:
>> How about a new backslash command or psql variable to show how long the
>> previous statement took? Something like:
> 
> If you don't have \timing turned on before the query starts, psql won't
> record what the time was before the query, so you can't compute the run
> time afterwards.  This kind of feature would only work if you always
> take the start time, even if \timing is turned off.

Correct. That seems acceptable though? gettimeofday() can be slow on 
some platforms, but I doubt it's *that* slow, that we couldn't call it 
two times per query.

- Heikki




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

Предыдущее
От: Melih Mutlu
Дата:
Сообщение: Re: Allow logical replication to copy tables in binary format
Следующее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: Time delayed LR (WAS Re: logical replication restrictions)