Re: FDW handling count(*) through AnalyzeForeignTable or other constant time push-down

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gabe F(dot) Rudy" <rudy(at)goldenhelix(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FDW handling count(*) through AnalyzeForeignTable or other constant time push-down
Date: 2016-02-26 06:21:22
Message-ID: 13359.1456467682@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Gabe F. Rudy" <rudy(at)goldenhelix(dot)com> writes:
> Is there any way to convince Postgres FDW to leverage the analyze row counts or even the "double* totalRowCount" returned from the AcquireSampleRows callback from my AnalyzeForeignTable function so that it does not do a full-table scan for a COUNT(*) etc?

No. In PG's view, ANALYZE-based row counts are imprecise by definition.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-02-26 06:30:51 Re: insufficient qualification of some objects in dump files
Previous Message Michael Paquier 2016-02-26 06:15:13 Re: insufficient qualification of some objects in dump files