From: legrand legrand <legrand_legrand@hotmail.com>
To: pgsql-hackers@postgresql.org
Subject: [survey] New "Stable" QueryId based on normalized query text
Date: Tue, 19 Mar 2019 14:00:15 -0700 (MST)
Message-ID: <1553029215728-0.post@n3.nabble.com> (raw)
Hello,
There are many projects that use alternate QueryId
distinct from the famous pg_stat_statements jumbling algorithm.
https://github.com/postgrespro/aqo
query_hash
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Optimize.ViewPlans.htm...
sql_hash
https://github.com/ossc-db/pg_hint_plan
queryid
Even pg_stat_statement has a normalize function,
that would answer the current question ...
Here are some *needs* :
needs.1: stable accross different databases,
needs.2: doesn't change after database or object rebuild,
needs.3: search_path / schema independant,
needs.4: pg version independant (as long as possible),
...
and some *normalization rules*:
norm.1: case insensitive
norm.2: blank reduction
norm.3: hash algoritm ?
norm.4: CURRENT_DATE, CURRENT_TIME, LOCALTIME, LOCALTIMESTAMP not normalized
norm.5: NULL, IS NULL not normalized ?
norm.6: booleans t, f, true, false not normalized
norm.7: order by 1,2 or group by 1,2 should not be normalized
norm.8: pl/pgsql anonymous blocks not normalized
norm.9: comments aware
Do not hesitate to add your thougths
Regards
PAscal
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: legrand_legrand@hotmail.com
Subject: Re: [survey] New "Stable" QueryId based on normalized query text
In-Reply-To: <1553029215728-0.post@n3.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox