Re: foreign key constraint, planner ignore index.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Andrew Nesheret <andrew(at)infinet(dot)ru>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: foreign key constraint, planner ignore index.
Date: 2007-12-20 13:26:28
Message-ID: 476A6D84.2030107@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrew Nesheret wrote:
> Richard Huxton wrote:
>> Does the attached small script misbehave in the same way as your real
>> data? From here it works fine when the fkey is ON ... RESTRICT.
>>
>> I'm right in thinking that your "nodes" fkey is RESTRICT on update and
>> delete?
>>
> Yes, data is real and my my foreign key contraint is "restrict" (i'm
> understand this is very important).

Well, the RESTRICT bit is because with that test script in my last email
it's instant here on PostgreSQL 8.2 (not bothered testing 8.3beta).

The test script generates 10 million rows in the "traffic" table which
should be close enough to replicate your problem.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Nesheret 2007-12-20 13:26:55 Re: foreign key constraint, planner ignore index.
Previous Message Andrew Nesheret 2007-12-20 12:56:07 Re: foreign key constraint, planner ignore index.