pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Arash Zaryoun <Arash_Zaryoun@CBC.CA>
Cc: pgsql-performance@postgresql.org
Subject: Re: Weird Database Performance problem!
Date: Fri, 13 Aug 2004 16:20:04 +0100
Message-ID: <411CDC24.4090706@archonet.com> (raw)
In-Reply-To: <s11c9b74.028@cbc.ca>
References: <s11c9b74.028@cbc.ca>

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



view thread (3+ messages)  latest in thread

Message-ID: <411CDC24.4090706@archonet.com>
Permalink:  ../411CDC24.4090706@archonet.com/
Also on:    postgresql.org/message-id/411CDC24.4090706@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dev@archonet.com, Arash_Zaryoun@CBC.CA
  Subject: Re: Weird Database Performance problem!
  In-Reply-To: <411CDC24.4090706@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox