Re: Weird Database Performance problem! - Mailing list pgsql-performance

From Richard Huxton
Subject Re: Weird Database Performance problem!
Date
Msg-id 411CDC24.4090706@archonet.com
Whole thread Raw
In response to Weird Database Performance problem!  ("Arash Zaryoun" <Arash_Zaryoun@CBC.CA>)
Responses Reiser4
List pgsql-performance
Arash Zaryoun wrote:
> Hi,
>
> We are having a performance problem with our database. The problem
> exists when we include a constraint in GCTBALLOT. The constraint is as
> follows:
>
> alter table GCTBALLOT
>    add constraint FK_GCTBALLOT_GCTWEBU foreign key (GCTWEBU_SRL)
>       references GCTWEBU (SRL)
>       on delete restrict on update restrict;
>
> The two tables that we insert into are the following:

> GCTBALLOT:
>  gctwebu_srl      | numeric(12,0)               |

> GCTWEBU:
>  srl             | integer                     | not null default

Your types don't match. You have a numeric referencing an integer. PG
probably isn't using the index (it's smarter about this in 8.0 iirc).

HTH
--
   Richard Huxton
   Archonet Ltd

pgsql-performance by date:

Previous
From: "Arash Zaryoun"
Date:
Subject: Performance Problem With Postgresql!
Next
From: Bruno Wolff III
Date:
Subject: Re: insert