Re: creating a subset DB efficiently ?

From: "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: creating a subset DB efficiently ?
Date: 2024-03-09 21:34:55
Message-ID: 20240309213455.i2trc3sc4caxoqel@hjp.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-03-08 11:22:17 -0500, David Gauthier wrote:
> Related question...
> The "delete from par_tbl_a where project <> 'a' " is taking forever.

Have you checked whether all the FK columns have an index? Otherwise
checking for references means a full table scan which may take a long
time.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Sargent 2024-03-10 00:18:07 Re: Insert with Jsonb column hangs
Previous Message Steve Baldwin 2024-03-09 21:05:44 Re: Help diagnosing replication (copy) error