Re: Is this a bug or am I doing something wrong?
От | Richard Huxton |
---|---|
Тема | Re: Is this a bug or am I doing something wrong? |
Дата | |
Msg-id | 43217F3A.7080307@archonet.com обсуждение исходный текст |
Ответ на | Is this a bug or am I doing something wrong? (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>) |
Ответы |
Re: Is this a bug or am I doing something wrong?
|
Список | pgsql-general |
Joost Kraaijeveld wrote: > Hi, > > I am trying to create a foreign key, followed by creating anindex on the > foreign key, using PgAdmin III > > The command that are generated : > > ALTER TABLE prototype.orderlines ADD CONSTRAINT fk_orderlines_orders > FOREIGN KEY (orderobjectid) REFERENCES prototype.orders (objectid) > ON UPDATE RESTRICT ON DELETE RESTRICT; > > CREATE INDEX fki_orderlines_orders ON > prototype.orderlines(orderobjectid); > > Ont the second command PostgreSQL hangs forever. The > prototype.orderlines table is completely empty, the prototype.orders > table contains 1.000.000+ records. Well, if orderlines is empty it shouldn't take long to create an index. I'd suspect lock issues - see what's in the pg_locks view. It's also worth trying these things in psql too - that way you know exactly what is being executed. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: