Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DISTRIBUTE BY
- Note: The following description applies only to Postgres-XC
- This clause specifies how the table is distributed or replicated among Datanodes.
- REPLICATION
- Each row of the table will be replicated into all the Datanode of the Postgres-XC database cluster.
- ROUNDROBIN
- Each row of the table will be placed in one of the Datanodes by round-robin manner. The value of the row will not be needed to determine what Datanode to go.
- HASH ( column_name )
- Each row of the table will be placed based on the hash value of the specified column. Following type is allowed as distribution column: INT8, INT2, OID, INT4, BOOL, INT2VECTOR, OIDVECTOR, CHAR, NAME, TEXT, BPCHAR, BYTEA, VARCHAR, FLOAT4, FLOAT8, NUMERIC, CASH, ABSTIME, RELTIME, DATE, TIME, TIMESTAMP, TIMESTAMPTZ, INTERVAL, and TIMETZ.
- Please note that floating point is not allowed as a basis of the distribution column.
- MODULO ( column_name )
- Each row of the table will be placed based on the modulo of the specified column. Following type is allowed as distribution column: INT8, INT2, OID, INT4, BOOL, INT2VECTOR, OIDVECTOR, CHAR, NAME, TEXT, BPCHAR, BYTEA, VARCHAR, FLOAT4, FLOAT8, NUMERIC, CASH, ABSTIME, RELTIME, DATE, TIME, TIMESTAMP, TIMESTAMPTZ, INTERVAL, and TIMETZ.
- Please note that floating point is not allowed as a basis of the distribution column.
- If DISTRIBUTE BY is not specified, columns with UNIQUE constraint will be chosen as the distribution key. If no such column is specified, distribution column is the first eligible column in the definition. If no such column is found, then the table will be distributed by ROUNDROBIN.
- TO GROUP
- TO NODE
- This defines on the list of nodes on which table data exists. If this is not specified table data is present on all Datanodes.
- nodename
- Associated with TO NODE, it defines a Postgres-XC node of catalog pgxc_node.
- groupname
- Associated with TO GROUP, it defines a Postgres-XC node group in catalog pgxc_group.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement