From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Shigeru Hanada <shigeru.hanada@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: WIP: Collecting statistics on CSV file data
Date: Tue, 18 Oct 2011 14:45:19 +0900
Message-ID: <4E9D126F.5010508@lab.ntt.co.jp> (raw)
In-Reply-To: <4E9C6573.8050507@gmail.com>
References: <4E6DE18B.4010505@lab.ntt.co.jp>
<4E7861C1.2000607@gmail.com>
<4E8EC1D8.3080700@lab.ntt.co.jp>
<4E9C6573.8050507@gmail.com>
(2011/10/18 2:27), Shigeru Hanada wrote:
> The new patch could be applied with some shifts. Regression tests of
> core and file_fdw have passed cleanly. Though I've tested only simple
> tests, ANALYZE works for foreign tables for file_fdw, and estimation of
> costs and selectivity seem appropriate.
Thank you for your testing.
> New API AnalyzeForeignTable
> ===========================
> And I think that AnalyzeForeignTable should be optional, and it would be
> very useful if a default handler is provided. Probably a default
> handler can use basic FDW APIs to acquire sample rows from the result of
> "SELECT * FROM foreign_table" with skipping periodically. It won't be
> efficient but I think it's not so unreasonable.
I agree with you. However, I think that it is difficult to support such
a default handler in a unified way because there exist external data
sources for which we cannot execute "SELECT * FROM foreign_table", e.g.,
web-accessible DBs limiting full access to the contents.
> Other issues
> ============
> There are some other comments about non-critical issues.
> - When there is no analyzable column, vac_update_relstats is not called.
> Is this behavior intentional?
> - psql can't complete foreign table name after ANALYZE.
> - A new parameter has been added to vac_update_relstats in a recent
> commit. Perhaps 0 is OK for that parameter.
I'll check.
> - ANALYZE without relation name ignores foreign tables because
> get_rel_oids doesn't list foreign tables.
I think that it might be better to ignore foreign tables by default
because analyzing such tables may take long depending on FDW.
> - IMO logging "analyzing foo.bar" should not be done in
> AnalyzeForeignTable handler of each FDW because some FDW might forget to
> do it. Maybe it should be pulled up to analyze_rel or somewhere in core.
> - It should be mentioned in a document that foreign tables are not
> analyzed automatically because they are read-only.
OK. I'll revise.
> Regards,
Best regards,
Etsuro Fujita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: fujita.etsuro@lab.ntt.co.jp, shigeru.hanada@gmail.com
Subject: Re: WIP: Collecting statistics on CSV file data
In-Reply-To: <4E9D126F.5010508@lab.ntt.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox