Re: pg_statistic MCVs use float4 but extended stats use float8

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: pg_statistic MCVs use float4 but extended stats use float8
Дата
Msg-id 14390227-9931-585e-57e2-6e1d1d568382@enterprisedb.com
обсуждение исходный текст
Ответ на pg_statistic MCVs use float4 but extended stats use float8  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
Hi,

On 2/15/23 02:20, Justin Pryzby wrote:
> It seems odd that stats_ext uses double:
> 
> postgres=# SELECT attrelid::regclass, attname, atttypid::regtype, relkind FROM pg_attribute a JOIN pg_class c ON
c.oid=a.attrelidWHERE attname='most_common_freqs';
 
>       attrelid      |      attname      |      atttypid      | relkind 
> --------------------+-------------------+--------------------+---------
>  pg_stats           | most_common_freqs | real[]             | v
>  pg_stats_ext       | most_common_freqs | double precision[] | v
>  pg_stats_ext_exprs | most_common_freqs | real[]             | v
> 
> I'm not sure if that's deliberate ?
> 

Not really, I'm not sure why I chose float8 and not float4. Likely a
cause of muscle memory on 64-bit systems.

I wonder if there are practical reasons to change this, i.e. if the
float8 can have adverse effects on some systems. Yes, it makes the stats
a little bit larger, but I doubt the difference is significant enough to
make a difference. Perhaps on 32-bit systems it's worse, because float8
is going to be pass-by-ref there ...


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Can we do something to help stop users mistakenly using force_parallel_mode?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Use of additional index columns in rows filtering