Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #577

Re: the performance cost of a postgresql key violation exception

From Dimitri Fontaine <dimitri@2ndQuadrant.fr>
Newsgroups comp.databases.postgresql
Subject Re: the performance cost of a postgresql key violation exception
Date 2014-07-20 14:51 +0200
Organization A noiseless patient Spider
Message-ID <m2lhrourax.fsf@2ndQuadrant.fr> (permalink)
References <ed6a893b-3427-4f69-b574-2eb9d0d79b75@googlegroups.com>

Show all headers | View raw


stoicism1@aol.com writes:
>     org.postgresql.util.PSQLException: ERROR: duplicate key value 
>       violates unique constraint "reports_uniqueness_index"
>
> What is the cost performance of this?

For PostgreSQL, an index lookup that it has to do anyway for inserting
the new row at the right place. For your application, I don't know, you
have to make some tests.

-- 
Dimitri Fontaine
PostgreSQL DBA, Architecte

Back to comp.databases.postgresql | Previous | NextPrevious in thread | Find similar


Thread

the performance cost of a postgresql key violation exception stoicism1@aol.com - 2014-07-19 11:07 -0700
  Re: the performance cost of a postgresql key violation exception Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2014-07-20 14:51 +0200

csiph-web