Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Lock Table
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 toolReceived on Thu Sep 08 2005 - 16:24:23 CDT