Upgrading the PDB$SEED takes always longer than any other container.
What is the reason for an upgrade of the PDB$SEED taking so much longer in a real world environment?
How does an upgrade with Oracle Multitenant work?
I have written several blog posts in the past about the different techniques to upgrade an Oracle Multitenant environment:
The interesting case happens in the “Everything At Once“. The PDB$SEED takes significantly longer to upgrade than any other container.
Upgrading the PDB$SEED takes always longer?
Quick recap: The PDB$SEED is the (I call it) blueprint PDB which gets used to provision a new PDB quickly as a clone of the PDB$SEED with some additions. It is (for users) always READ ONLY and UNTOUCHABLE. This means, as a user you are not allowed to touch or change or modify or manipulate it. If you still do so, you’ll hit “unsupported” territory.
Here you’ll find a complete example for an Everything At Once upgrade:
As the PDB$SEED is read only and untouchable, a design decision has been taken to RECOMPILE all invalid objects within the PDB$SEED container while the PDB$SEED is in UPGRADE mode. All other containers get recompiled AFTER the upgrade itself has been finished.
This is the reason why the upgrade of the PDB$SEED takes longer than expected.
Example
When you look into the log files post upgrade you will spot the reason for the longer duration of the PDB$SEED upgrade (marked in RED below):
Oracle Database 12.2 Post-Upgrade Status Tool 05-09-2017 14:46:01
[PDB1]
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
Oracle Server UPGRADED 12.2.0.1.0 00:32:28
Oracle Real Application Clusters UPGRADED 12.2.0.1.0 00:00:00
Oracle XML Database UPGRADED 12.2.0.1.0 00:02:24
Final Actions 00:06:59
Post Upgrade 00:03:07
Total Upgrade Time: 00:45:31 [PDB1]
Oracle Database 12.2 Post-Upgrade Status Tool 05-09-2017 15:03:52
[PDB$SEED]
Component Current Version Elapsed Time
Name Status Number HH:MM:SS
Oracle Server VALID 12.2.0.1.0 00:32:24
Oracle Real Application Clusters OPTION OFF 12.2.0.1.0 00:00:00
Oracle XML Database VALID 12.2.0.1.0 00:02:25
Final Actions 00:06:44
Post Upgrade 00:03:16
Post Compile 00:18:02
Total Upgrade Time: 01:03:24 [PDB$SEED]
The “Post Compile
” phase does not exist for any other container as part of the upgrade.
–Mike