EXECUTE DIRECT

Function

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.

Precautions

Syntax

1
EXECUTE DIRECT ON ( nodename [, ... ] ) query ;

Parameter Description

Examples

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)