Changed Behavior with GPORCA
When GPORCA is enabled, HAWQ’s behavior changes. This topic describes these changes.
- The command
CREATE TABLE ASdistributes table data randomly if theDISTRIBUTED BYclause is not specified and no primary or unique keys are specified. - Statistics are required on the root table of a partitioned table. The
ANALYZEcommand generates statistics on both root and individual partition tables (leaf child tables). See theROOTPARTITIONclause forANALYZEcommand. - Additional Result nodes in the query plan:
- Query plan
Assertoperator. - Query plan
Partition selectoroperator. - Query plan
Splitoperator.
- Query plan
- When running
EXPLAIN, the query plan generated by GPORCA is different than the plan generated by the legacy query optimizer. - HAWQ adds the log file message
Planner produced planwhen GPORCA is enabled and HAWQ falls back to the legacy query optimizer to generate the query plan. - HAWQ issues a warning when statistics are missing from one or more table columns. When executing an SQL command with GPORCA, HAWQ issues a warning if the command performance could be improved by collecting statistics on a column or set of columns referenced by the command. The warning is issued on the command line and information is added to the HAWQ log file. For information about collecting statistics on table columns, see the
ANALYZEcommand.