Re: Multiple Query IDs for a rewritten parse tree

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Multiple Query IDs for a rewritten parse tree
Дата
Msg-id 20220109121321.3d74krhjbr5mp4zv@jrouhaud
обсуждение исходный текст
Ответ на Re: Multiple Query IDs for a rewritten parse tree  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Multiple Query IDs for a rewritten parse tree  ("Andrey V. Lepikhov" <a.lepikhov@postgrespro.ru>)
Список pgsql-hackers
On Sat, Jan 08, 2022 at 07:49:59PM -0500, Tom Lane wrote:
>
> The idea I'd been vaguely thinking about is to allow attaching a list
> of query-hash nodes to a Query, where each node would contain a "tag"
> identifying the specific hash calculation method, and also the value
> of the query's hash calculated according to that method.

For now the queryid mixes two different things: fingerprinting and query text
normalization.  Should each calculation method be allowed to do a different
normalization too, and if yes where should be stored the state data needed for
that?  If not, we would need some kind of primary hash for that purpose.

Looking at Andrey's use case for wanting multiple hashes, I don't think that
adaptive optimization needs a normalized query string.  The only use would be
to output some statistics, but this could be achieved by storing a list of
"primary queryid" for each adaptive entry.  That's probably also true for
anything that's not monitoring intended.  Also, all monitoring consumers should
probably agree on the same queryid, both fingerprint and normalized string, as
otherwise it's impossible to cross-reference metric data.



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Multiple Query IDs for a rewritten parse tree
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: null iv parameter passed to combo_init()