Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c

Поиск
Список
Период
Сортировка
От Piotr Stefaniak
Тема Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c
Дата
Msg-id BLU437-SMTP95EEBC8DD06F30A375ECDFF2840@phx.gbl
обсуждение исходный текст
Ответ на Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c  (Piotr Stefaniak <postgres@piotr-stefaniak.me>)
Re: Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I'm not saying this is necessarily a bug since the whole function deals 
with floats, but perhaps it's interesting to note that ndistinct can be 
0 in src/backend/utils/adt/selfuncs.c:estimate_hash_bucketsize:/* * Initial estimate of bucketsize fraction is
1/nbucketsas long as the * number of buckets is less than the expected number of distinct values; * otherwise it is
1/ndistinct.*/if (ndistinct > nbuckets)    estfract = 1.0 / nbuckets;else    estfract = 1.0 / ndistinct;
 

for this query:
select subq_0.c1 as c0
from (  select ref_0.a as c0, (select NULL::integer from 
information_schema.user_defined_types limit 1 offset 1) as c1  from public.rtest_nothn3 as ref_0  limit 130
) as subq_0
left join (  select sample_0.x as c0  from public.insert_tbl as sample_0  where false
) as subq_1 on subq_0.c1 = subq_1.c0;



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

Предыдущее
От: "Regina Obe"
Дата:
Сообщение: Re: If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?
Следующее
От: "Regina Obe"
Дата:
Сообщение: Re: Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64