Re: Optimistic or Pessimistic Concurrency Control?

From: Jan Hidders <hidders_at_REMOVE.THIS.win.tue.nl>
Date: 11 Sep 2000 09:36:38 GMT
Message-ID: <8pi936$pmt$1_at_news.tue.nl>


Mark D Powell wrote:
> "Tony" <tony_at_my.isp.net> wrote:
> > "Joe Trubisz" <trubisz_at_cs.sunysb.edu> wrote:
> > > Tony (tony_at_my.isp.net) wrote:
> > > : Which is decidedly 'better' (most often used in current commercial
> > > : databases) optimistic or pessimistic concurrency control and why?
> > >
> > > Neither. Most use two-phase locking. Some offer optimistic, but
> > > it's rarely used.
> >
> > I thought locking WAS a (read, is THE) pessimistic technique.
>
> The only two-phase locking I am familiar with is on distributed
> queries. [...]

Perhaps you are confusing the Two Phase Locking Protocol and the Two Phase Commit Protocol? The first protocol is for a single database and says that you have two phases; the first you acquire locks and the second you release locks. The second protocol is for coordinating a transaction over several databases (within a distributed database) and says that here you have also two phases; a prepare phase where the coordinator requests the participants to prepare for a certain update, and a commit/rollback phase where the coordinator tells to participants to commit or rollback.

-- 
Kind regards,

    Jan Hidders
Received on Mon Sep 11 2000 - 11:36:38 CEST

Original text of this message