question on most efficient way to increment a column

From: Tyson Maly <tvmaly(at)yahoo(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: question on most efficient way to increment a column
Date: 2013-05-08 13:45:13
Message-ID: 1368020713.12089.YahooMailNeo@web120504.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If I have a simple table with an id as a primary key that is a serial column and a column to keep track of a total_count for a particular id, what method would provide the fastest way to increment the total_count in the shortest amount of time and minimize any locking?

id  serial
total_count integer

Best regards,

Ty

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2013-05-08 14:02:34 Re: question on most efficient way to increment a column
Previous Message Seref Arikan 2013-05-08 13:40:49 Does it make sense to break a large query into separate functions?