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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Skip Locked failed to return correct result set.

Re: Skip Locked failed to return correct result set.

From: Jim Thompson <jim.thompson_at_lagosantafe.com>
Date: 16 Dec 2002 08:04:57 -0800
Message-ID: <8f516336.0212160804.4ba2ffe5@posting.google.com>


Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote in message news:<rckcvugjibfptffd4jqr0rbrv1n1dv87rl_at_4ax.com>...
> On 10 Dec 2002 11:45:25 -0800, jim.thompson_at_lagosantafe.com (Jim
> Thompson) wrote:
>
> >SELECT *
> >FROM Libra_Sentinel
> >WHERE DomainObject_uuid in ('D67E84DF7BDFCC419A0E22C93ED7AE6F')
> >FOR UPDATE NOWAIT SKIP LOCKED
> >
> >returns the correct result set -- one row.
> >
> >SELECT *
> >FROM TradePilot.Libra_Sentinel
> >WHERE DomainObject_uuid in HEXTORAW('D67E84DF7BDFCC419A0E22C93ED7AE6F')
> >FOR UPDATE NOWAIT skip locked
> >
> >returns the wrong result set -- "nothing"
> >
> >Any suggestions?
> >
> >BTW, the HEXTORAW allows use of index in query.
> >
> >Use of skip locked is very important in the logic of this app.
>
>
> Not sure why you are using 'IN' when you are only searching for
> equality.
> Apparently you have an implicit RAWTOHEX(domainobject_uuid) in the
> first statement.
> If you can demonstrate there is no difference between statement 1 and
> and the explicit RAWTOHEX conversion, it looks like statement 2 must
> be considered to suffer from a bug.
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address

I cut the IN list down, usually there are many, just for the example.

The domainobject_uuid is defined as RAW(16). I'd like to use HEXTORAW since Oracle will use index! Received on Mon Dec 16 2002 - 10:04:57 CST

Original text of this message

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