Re: LONG delete with LOTS of FK's

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Larry Rosenman <ler(at)lerctr(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: LONG delete with LOTS of FK's
Date: 2013-05-10 15:57:17
Message-ID: 8625.1368201437@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Larry Rosenman <ler(at)lerctr(dot)org> writes:
> On 2013-05-10 09:14, Tom Lane wrote:
>> ... and verify you get a cheap plan for each referencing table.

> We don't :(

Ugh. I bet the problem is that in some of these tables, there are lots
and lots of duplicate account ids, such that seqscans look like a good
bet when searching for an otherwise-unknown id. You don't see this
with a handwritten test for a specific id because then the planner can
see it's not any of the common values.

9.2 would fix this for you --- any chance of updating?

regards, tom lane

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Larry Rosenman 2013-05-10 16:01:15 Re: LONG delete with LOTS of FK's
Previous Message Sebastian P. Luque 2013-05-10 15:53:45 authentication/privileges