You mean pg_upgrade?
Database statistics are not preserved across pg_upgrade so you'll have to run ANALYZE on the database after the upgrade which may take a while as it usually needs to read all or almost all of your data.
I just recently upgraded a ~1 TB database, the actual upgrade process took less than a minute but analyzing it took much longer.