I was wondering how difficult it would be to add the C functions necessary to make analyze work. The FDW docs indicate that these are the only two functions you would need
bool
AnalyzeForeignTable (Relation relation,
AcquireSampleRowsFunc func,
BlockNumber totalpages);
and
int
AcquireSampleRowsFunc (Relation relation, int elevel,
HeapTuple rows, int targrows,
double totalrows,
double *totaldeadrows);
http://www.postgresql.org/docs/current/static/fdw-callbacks.html
I think this would make a fair number of queries faster.
I was wondering how difficult it would be to add the C functions necessary to make analyze work. The FDW docs indicate that these are the only two functions you would need bool AnalyzeForeignTable (Relation relation, AcquireSampleRowsFunc func, BlockNumber totalpages); and int AcquireSampleRowsFunc (Relation relation, int elevel, HeapTuple rows, int targrows, double totalrows, double *totaldeadrows); http://www.postgresql.org/docs/current/static/fdw-callbacks.html I think this would make a fair number of queries faster.