Changed Behavior with GPORCA
When GPORCA is enabled, HAWQ’s behavior changes. This topic describes these changes.
- The command
CREATE TABLE AS
distributes table data randomly if theDISTRIBUTED BY
clause is not specified and no primary or unique keys are specified. - Statistics are required on the root table of a partitioned table. The
ANALYZE
command generates statistics on both root and individual partition tables (leaf child tables). See theROOTPARTITION
clause forANALYZE
command. - Additional Result nodes in the query plan:
- Query plan
Assert
operator. - Query plan
Partition selector
operator. - Query plan
Split
operator.
- 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 plan
when 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
ANALYZE
command.