Re: postgres_fdw: using TABLESAMPLE to collect remote sample
От | Tom Lane |
---|---|
Тема | Re: postgres_fdw: using TABLESAMPLE to collect remote sample |
Дата | |
Msg-id | 1297000.1658258876@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: postgres_fdw: using TABLESAMPLE to collect remote sample (Tomas Vondra <tomas.vondra@enterprisedb.com>) |
Список | pgsql-hackers |
Tomas Vondra <tomas.vondra@enterprisedb.com> writes: > I we want to improve sampling for partitioned cases (where the foreign > table is just one of many partitions), I think we'd have to rework how > we determine sample size for each partition. Now we simply calculate > that from relpages, which seems quite fragile (different amounts of > bloat, different tuple densities) and somewhat strange for FDW serves > that don't use the same "page" concept. > So it may easily happen we determine bogus sample sizes for each > partition. The difficulties when calculating the sample_frac is just a > secondary issue. > OTOH the concept of a "row" seems way more general, so perhaps > acquire_inherited_sample_rows should use reltuples, and if we want to do > correction it should happen at this stage already. Yeah, there's definitely something to be said for changing that to be based on rowcount estimates instead of physical size. I think it's a matter for a different patch though, and not a reason to hold up this one. regards, tom lane
В списке pgsql-hackers по дате отправления: