mirror of https://github.com/citusdata/citus.git
improve rel size estimate
parent
a05e75a6d1
commit
c303f0f135
|
@ -549,11 +549,17 @@ cstore_estimate_rel_size(Relation rel, int32 *attr_widths,
|
||||||
BlockNumber *pages, double *tuples,
|
BlockNumber *pages, double *tuples,
|
||||||
double *allvisfrac)
|
double *allvisfrac)
|
||||||
{
|
{
|
||||||
/* TODO */
|
RelationOpenSmgr(rel);
|
||||||
*attr_widths = 12;
|
*pages = smgrnblocks(rel->rd_smgr, MAIN_FORKNUM);
|
||||||
*tuples = 100;
|
*tuples = CStoreTableRowCount(rel);
|
||||||
*pages = 10;
|
|
||||||
|
/*
|
||||||
|
* Append-only, so everything is visible except in-progress or rolled-back
|
||||||
|
* transactions.
|
||||||
|
*/
|
||||||
*allvisfrac = 1.0;
|
*allvisfrac = 1.0;
|
||||||
|
|
||||||
|
get_rel_data_width(rel, attr_widths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue