Skip site navigation (1) Skip section navigation (2)

What executes faster?

From: Haller Christoph <ch(at)rodos(dot)fzk(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: What executes faster?
Date: 2001-10-01 11:24:11
Message-ID: 200110010924.LAA27222@rodos (view raw or flat)
Thread:
Lists: pgsql-hackers
[HACKERS] What executes faster? 
Now that I've found the solution for my duplicate key problem, 
I'm wondering what executes faster when I have to check for 
duplicates. 
 1. try to update 
    if no row affected -> do the insert 
    else done 
 2. do a select 
    if row not found -> do the insert 
    else do the update 
Another idea I'm thinking about: 
I'm doing the check for duplicate key by myself now. 
Aren't insert commands running faster, if I replace 
an unique index by a not-unique index. 

Regards, Christoph 

Responses

pgsql-hackers by date

Next:From: Justin CliftDate: 2001-10-01 11:40:41
Subject: Re: Bulkloading using COPY - ignore duplicates?
Previous:From: Lee KindnessDate: 2001-10-01 11:04:41
Subject: Bulkloading using COPY - ignore duplicates?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group