Re: [survey] New "Stable" QueryId based on normalized query text

From: legrand legrand <legrand_legrand(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [survey] New "Stable" QueryId based on normalized query text
Date: 2019-03-20 20:05:06
Message-ID: 1553112306545-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> From "Kyotaro HORIGUCHI-2"
>>At Wed, 20 Mar 2019 00:23:30 +0000, "Tsunakawa, Takayuki"
>>> From: legrand legrand [mailto:legrand_legrand(at)]
>>> norm.9: comments aware
>> Is this to distinguish queries that have different comments for optimizer
>> hints? If yes, I agree.

> Or, any means to give an explict query id? I saw many instances
> of query that follows a comment describing a query id.

Yes, in fact didn't thought about different kink of comments, but all of
them

>> needs.3: search_path / schema independant,

>pg_stat_statements even ignores table/object/column names.

there is a very interesting thread about that in "pg_stat_statements and non
default search_path"
https://www.postgresql.org/message-id/8f54c609-17c6-945b-fe13-8b07c0866420@dalibo.com

expecting distinct QueryIds when using distinct schemas ...
maybe that It should be switched to "Schema dependant"

>> needs.4: pg version independant (as long as possible),

>I don't think this cannot be guaranteed.

maybe using a QueryId versioning GUC

>> 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

> pg_stat_statements can be the base of the discussion on them.

OK

Regards
PAscal

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-03-20 20:24:25 Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Previous Message Joel Jacobson 2019-03-20 19:55:56 Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)