If you have dump enabled to one group, and load enabled from another group, without replace mode enabled:
If a valid plan exists for the query in the load group, it is loaded and used. The plan is saved in the dump group, unless a plan for the query already exists in the dump group.
If the plan in the load group is not valid, a new plan is generated. The new plan is saved in the dump group, unless a plan for the query already exists in the dump group.
If the plan in the load group is a partial plan, a full plan is generated and saved in the dump group, unless a plan already exists. The specifications in the partial plan are used as input to the optimizer.
If there is no plan for the query in the load group, the plan is generated and saved in the dump group, unless a plan for the query exists in the dump group.
With replace mode active:
If a valid plan exists for the query in the load group, it is loaded and used.
If the plan in the load group is not valid, a new plan is generated and used to optimize the query. The new plan is saved in the dump group.
If the plan in the load group is a partial plan, a full plan is generated and saved in the dump group. The specifications in the partial plan are used as input to the optimizer.
If a plan does not exist for the query in the load group, a new plan is generated. The new plan is saved in the dump group.