Re: foreign key constraint, planner ignore index. - Mailing list pgsql-general

From Richard Huxton
Subject Re: foreign key constraint, planner ignore index.
Date
Msg-id 476A6D84.2030107@archonet.com
Whole thread Raw
In response to Re: foreign key constraint, planner ignore index.  (Andrew Nesheret <andrew@infinet.ru>)
List 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

pgsql-general by date:

Previous
From: Andrew Nesheret
Date:
Subject: Re: foreign key constraint, planner ignore index.
Next
From: Andrew Nesheret
Date:
Subject: Re: foreign key constraint, planner ignore index.