<div class="WordSection1"><p class="MsoNormal">Hey all,<p class="MsoNormal"> <p class="MsoNormal">I’m building a FDW
arounda column-store backend (similar to CStore but for genomic data!).<p class="MsoNormal"> <p class="MsoNormal">I
havetables in the billions of rows, and have a common query pattern of asking for the table size (i.e. SELECT COUNT(*)
FROMbig_fdw_table; ).<p class="MsoNormal"> <p class="MsoNormal">This is a read-optimized system in which I know in
constanttime the exact dimensions of the table.<p class="MsoNormal"> <p class="MsoNormal">Is there any way to convince
PostgresFDW to leverage the analyze row counts or even the “double* totalRowCount” returned from the AcquireSampleRows
callbackfrom my AnalyzeForeignTable function so that it does not do a full-table scan for a COUNT(*) etc?<p
class="MsoNormal"> <pclass="MsoNormal">My current fallback is to export a specialized function that returns the table
rowcount for a given FDW table, but that then leaks into the user-application driving these queries.<p
class="MsoNormal"> <pclass="MsoNormal">Thanks in advance!<p class="MsoNormal">Gabe<p class="MsoNormal"> <p
class="MsoNormal"style="background:white"><b><span style="font-size:10.0pt;color:#262626">Gabe Rudy</span></b><span
style="font-size:10.0pt;color:#595959">| VP Product & Engineering | Golden Helix, Inc.</span><span
style="color:black"></span><pclass="MsoNormal"> </div>