How to improve performance in data present in pivod table?

@Jay It looks like you have tried to migrate and upgrade at the same time, which is not recommended:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html#before-you-migrate

So first make sure you're using 0.41.4 on H2, verify everything works, then migrate (again with 0.41.4), and then run 0.41.4 on Postgres.