To support various tweaks during plan construction: OP_STAGE_NONE (0) to not stage anything in shared memory OP_STAGE_INC (1) to stage only OP_INC variables and OP_STAGE_ALL (2) to stage all indirectly accessed data. Furthermore OP_STAGE_PERMUTE (3) creates the plan.col_reord field that gives you a permutation of set elements within each mini-partition sorted by colour. Also permutes plan.thrcol