EXECUTE DIRECT executes an SQL statement on a specified node. Generally, the cluster automatically allocates an SQL statement to proper nodes. EXECUTE DIRECT is mainly used for database maintenance and testing.
1 | EXECUTE DIRECT ON ( nodename [, ... ] ) query ; |
Specifies the node name.
Value range: An existing node.
Specifies the query SQL statement that you want to execute.
Query records in table tpcds.customer_address on the dn_6001_6002 node.
1 2 3 4 5 | EXECUTE DIRECT ON(dn_6001_6002) 'select count(*) from tpcds.customer_address'; count ------- 16922 (1 row) |