From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | 64-bit queryId? |
Date: | 2017-09-29 23:42:02 |
Message-ID: | CA+TgmobG_Kp4cBKFmsznUAaM1GWW6hhRNiZC0KjRMOOeYnz5Yw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Our Query currently has space for a 32-bit queryId, but that seems
reasonably likely to result in collisions:
https://en.wikipedia.org/wiki/Birthday_problem#Probability_table
If you have as many as 50,000 queries, there's a 25% probability of
having at least one collision; that doesn't seem particularly
unrealistic. Obviously, normalization reduces the number of distinct
queries a lot, but if queries are dynamically generated you might
still have quite a few of them.
How about widening the value to uint64?
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2017-09-30 04:20:24 | Re: Parallel Append implementation |
Previous Message | Peter Geoghegan | 2017-09-29 23:38:00 | Re: CREATE COLLATION does not sanitize ICU's BCP 47 language tags. Should it? |