[PERFORM] Weird Database Performance problem!

2004-08-13 Thread Arash Zaryoun
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

Re: [PERFORM] Weird Database Performance problem!

2004-08-13 Thread Richard Huxton
Arash Zaryoun wrote: Hi Richard, Thanks for your prompt reply. It fixed the problem. Just one more question: Do I need to create an index for FKs? You don't _need_ to, but on the referring side (e.g. table GCTBALLOT in your example) PostgreSQL won't create one automatically. Of course, the