Arash Zaryoun wrote:

We are having a performance problem with our database. The problem
exists when we include a constraint in GCTBALLOT. The constraint is as

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:

 gctwebu_srl      | numeric(12,0)               |

 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).

  Richard Huxton
  Archonet Ltd

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

Reply via email to