From: Christian Paul B. Cosinas <cpc@cybees.com>
To: pgsql-sql@postgresql.org
Subject: Constraint Error effect on PostgreSQL
Date: Mon, 13 Mar 2006 03:25:00 -0800
Message-ID: <02d301c64690$c4af1000$1e21100a@ghwk02002147> (raw)
In-Reply-To: <441540AA.3090202@bankir.ru>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cpc@cybees.com
Subject: Re: Constraint Error effect on PostgreSQL
In-Reply-To: <02d301c64690$c4af1000$1e21100a@ghwk02002147>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox