Re: BUG #16904: Dropping and recreating a large table with 5 indexes slowed down query performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: tejaschavanr10(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16904: Dropping and recreating a large table with 5 indexes slowed down query performance
Date: 2021-03-01 14:40:07
Message-ID: 715949.1614609607@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> The steps performed are as below:
> - Renamed the original table as _bkp
> - Dropped indexes and constraints on the backup table
> - Created the original table along with indexes with the same index name as
> before

> Post performing this activity, the queries which where performing well
> before are running very slow.

Perhaps ANALYZE'ing the new table would help. I'd have expected
autovacuum to do that for you by now, but maybe it's not able to
complete for some reason.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2021-03-01 17:06:01 BUG #16908: Postgres (12) allows you (re)-attach partitions that violate Foreign Key constraints?
Previous Message Tom Lane 2021-03-01 14:36:26 Re: After upgrade from 9.4.1-3 to 10.15 and fresh install of 10.15 have some differences in the schema definition