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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to