Replies: 1 comment
-
The caching numbers for cstore_fdw are not reliable (read: nonsense). We recommend switching to Citus columnar. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is a simple execution plan
-> Foreign Scan on sale_agg_cs_top (cost=0.00..246114.29 rows=38218 width=10) (actual time=1.416..40.641 rows=35681 loops=1)
Filter: ((it <> 0) AND (dt = '2021-01-01'::date) AND (org = 20))
Rows Removed by Filter: 4319
CStore File: /var/lib/pgsql/10_5432/data/cstore_fdw/16409/197166612
CStore File Size: 263228026
Buffers: shared hit=17667
My question is why shared hit is do big?
I'll explain.
My table is 251 GB, It has 13498698 rows. Strip value is 150000 rows. So it seems the table has 13498698 / 150000 = 89 strips. And a single strip is going to be about 251 / 89 = 2 MB.
Also, there are three monthes in the table and dt='2021-01-01' means 4393831 rows.
What I know is that cstore processes data strip-by-strip. It is my understanding that shared hit should be about 2 MB, but it is much bigger, e.g. 17667 * 8 / 1024 = 138 MB.
One more thing. I noticed that shared hit is always 17667. No metter which query I run.
Beta Was this translation helpful? Give feedback.
All reactions