X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 391E09DC985 for ; Mon, 13 Mar 2006 07:16:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 12817-09-2 for ; Mon, 13 Mar 2006 07:16:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mailer.eglobalreach.net (mail.opm.ph [202.124.128.22]) by postgresql.org (Postfix) with ESMTP id 247539DC982 for ; Mon, 13 Mar 2006 07:16:01 -0400 (AST) Received: from ghwk02002147 (mailer.eglobalreach.net [127.0.0.1]) by mailer.eglobalreach.net (8.11.6p2/) with ESMTP id k2DBFwb10923 for ; Mon, 13 Mar 2006 19:15:58 +0800 From: "Christian Paul B. Cosinas" To: Subject: Constraint Error effect on PostgreSQL Date: Mon, 13 Mar 2006 03:25:00 -0800 Message-ID: <02d301c64690$c4af1000$1e21100a@ghwk02002147> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <441540AA.3090202@bankir.ru> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506 Thread-Index: AcZGhFHhZmnyP84ITCufzn4sZVEMmgAC8JgQ X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.824 required=5 tests=[AWL=0.824] X-Spam-Score: 0.824 X-Spam-Level: X-Archive-Number: 200603/182 X-Sequence-Number: 24528 Hi Fellow PostgreSQL users, Just a question here. Is there any bad effect on the PostgreSQL performance If I encounter many fails on inserting records to database with primary key column. For example I have this table CREATE TABLE unique_items ( item_id text NOT NULL, CONSTRAINT unique_items_pkey PRIMARY KEY (item_id), CONSTRAINT unique_item_id_fk FOREIGN KEY (item_id) REFERENCES items (item_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE ) WITH OIDS; With these valu: Unique items ------------ Item001 Then I have a program that insert 1(one) million times like this: Insert into unique_items(item_id) values('Item001) Ofcourse we all know that it will fail because there is already a record in the database. Would there be any bad effect on the database or none? Regards, Ian I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html