Re: question on most efficient way to increment a column

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Tyson Maly <tvmaly(at)yahoo(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, "laurenz(dot)albe(at)wien(dot)gv(dot)at" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Subject: Re: question on most efficient way to increment a column
Date: 2013-05-08 23:30:21
Message-ID: 7FAB13E7-78F2-47E2-B803-865A7D2BF7CD@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On May 8, 2013, at 21:14, Tyson Maly <tvmaly(at)yahoo(dot)com> wrote:

>
> The simple update is one I considered, but I think if I put it into a stored procedure it should run faster
>

Well, you would partially circumvent the query planner, but you would also circumvent any optimisation said query planner would be able to do based on the statistics for the values being updated.

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2013-05-08 23:34:58 Re: Normal errors codes in serializable transactions
Previous Message Jon Smark 2013-05-08 23:03:45 Normal errors codes in serializable transactions