- milestone: 1084945 --> Development Queue
Consider we have some tables in a 2 data node cluster, and we try the following queries
test=# select relname, seq_scan from pg_stat_user_tables;
relname | seq_scan
---------+----------
tab3 | 0
tab2 | 0
tab4 | 0
(3 rows)
test=# execute direct on data_node_1 'select relname, seq_scan from pg_stat_user_tables';
relname | seq_scan
---------+----------
tab2 | 14
tab3 | 0
tab4 | 1
(3 rows)
test=# execute direct on data_node_2 'select relname, seq_scan from pg_stat_user_tables';
relname | seq_scan
---------+----------
tab2 | 14
tab3 | 0
tab4 | 1
(3 rows)
Note that the number of sequential scans initiated on tab2 is ZERO on coordinator, where as it is 14 on data nodes.
In XC queries for catalog tables/ views based on catalog tables are targeted to coordinator only.
For statistic tables we will have to do stuff similar to the one we did for pg_relation_size.