Select and update with limit and locking

From: matt w <ogeoon(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Select and update with limit and locking
Date: 2011-01-24 02:54:35
Message-ID: AANLkTinmG0PKSb8ipSJhWN+Pc0jZ5OziVL-Oat1UgVKQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm trying to implement a priority queue. Performance is not much of an
issue but there will be about 10m entries.

I need to lock the table, select ~1000 entries (out of ~1m matching the
query) and update fields on only the entries selected.

Thanks so much for any help you can give me.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Sean Davis 2011-01-24 09:52:59 Re: Select and update with limit and locking
Previous Message Mladen Gogala 2011-01-23 02:44:01 Re: Passing a variable from the user interface to PostgreSQL