Search Postgresql Archives

Re: LONG delete with LOTS of FK's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Larry Rosenman <ler@xxxxxxxxxx> writes:
> On 2013-05-01 10:23, Shaun Thomas wrote:
>> Wow. I really hope every single one of those tables has an index on
>> the listed column, and it's the same datatype (bigint). Otherwise,
>> this is going to take a long, long time.

> Yes, all of them have at least one index that has account_id as the 
> first column (we use that to
> separate tenants in a multi-tenant app).

> I still wonder if there is a way to see where it is :(

You could try EXPLAIN ANALYZE on a cut-down query that just deletes
a few hundred or thousand rows.  That would help identify whether
there's a particular table that's causing the bottleneck.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux