Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. DISTRIBUTE BY
  2. Note: The following description applies only to Postgres-XC
  3.  
  4. This clause specifies how the table is distributed or replicated among Datanodes.
  5.  
  6. REPLICATION
  7. Each row of the table will be replicated into all the Datanode of the Postgres-XC database cluster.
  8.  
  9. ROUNDROBIN
  10. 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.
  11.  
  12. HASH ( column_name )
  13. 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.
  14.  
  15. Please note that floating point is not allowed as a basis of the distribution column.
  16.  
  17. MODULO ( column_name )
  18. 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.
  19.  
  20. Please note that floating point is not allowed as a basis of the distribution column.
  21.  
  22. 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.
  23.  
  24. TO GROUP
  25. TO NODE
  26. This defines on the list of nodes on which table data exists. If this is not specified table data is present on all Datanodes.
  27.  
  28. nodename
  29. Associated with TO NODE, it defines a Postgres-XC node of catalog pgxc_node.
  30.  
  31. groupname
  32. 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