Re: LONG delete with LOTS of FK's

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: <sthomas(at)optionshouse(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: LONG delete with LOTS of FK's
Date: 2013-05-01 15:31:08
Message-ID: b02a18b52b327376a0e7239450ca4b51@webmail.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2013-05-01 10:23, Shaun Thomas wrote:
> On 05/01/2013 10:17 AM, Larry Rosenman wrote:
>
>> I have an app that we have a number of tables that all have FK
>> relationships with the account table.
>
> OK so far.
>
>> Referenced by:
>> * Redacted one-billion foreign keys
>
> 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 :(

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 (c) E-Mail: ler(at)lerctr(dot)org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-05-01 15:36:52 Re: Simple SQL INSERT to avoid duplication failed: why?
Previous Message Shaun Thomas 2013-05-01 15:23:42 Re: LONG delete with LOTS of FK's