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

From Andrew Nesheret
Subject Re: foreign key constraint, planner ignore index.
Date
Msg-id 476A093C.5010805@infinet.ru
Whole thread Raw
In response to Re: foreign key constraint, planner ignore index.  (Richard Huxton <dev@archonet.com>)
Responses Re: foreign key constraint, planner ignore index.
Re: foreign key constraint, planner ignore index.
List pgsql-general
Richard Huxton wrote:
> Andrew Nesheret wrote:
>> Richard Huxton wrote:
>>> If you PREPARE .... then EXECUTE the same query, does it still use
>>> the index?
Tested, comments?

--- code -----

--- result ---
Result for node #2007
  Index Scan using fki_nodes on sf_ipv4traffic x  (cost=0.00..9.65
rows=1 width=6) (actual time=0.060..0.060 rows=0 loops=1)
    Index Cond: ($1 = node)
  Total runtime: 0.131 ms
Result for node #156
  Seq Scan on sf_ipv4traffic x  (cost=0.00..360281.29 rows=15795383
width=6) (actual time=0.048..108939.142 rows=15795376 loops=1)
    Filter: ($1 = node)
  Total runtime: 365989.953 ms

----
UP(subject), we are go away from my problem, in case of integrity check
with foreign key.

--
__________________________________
WBR, Andrew Nesheret ICQ:10518066


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres 8.3 HOT and non-persistent xids
Next
From: Andrew Nesheret
Date:
Subject: Re: foreign key constraint, planner ignore index.