Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Lock Table

Re: Lock Table

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Thu, 08 Sep 2005 22:24:23 +0100
Message-ID: <3ha1i11vvshai7un4ev5s7uoaostjmi5o4@4ax.com>


On 08 Sep 2005 19:25:36 GMT, xhoster_at_gmail.com wrote:

>DA Morgan <damorgan_at_psoug.org> wrote:
>> AnySQL (d.c.b.a) wrote:
>>> you can change you sql to select (1) from my_table for update, else
>>> oracle will never block reader.
>>
>> It is impossible, in Oracle, to block a reader? Where are you getting
>> your information?
>
>"Select...for update" reads things. "Select...for update" blocks. Hence,
>it is possible to block a reader.

 SELECT...FOR UPDATE is somewhat of a hybrid of a reader and a writer, since it's "read, and take a lock on anything read".

 There's no obvious way to block a plain "SELECT" in Oracle, i.e. just a reader. You can certainly slow a SELECT down, or cause it to fail with "snapshot too old" after a period of time. I don't think you can block one in the ordinary sense, though, since SELECT (without FOR UPDATE) doesn't take locks.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Thu Sep 08 2005 - 16:24:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US