Re: Which query is best?

  • From: Syed Jaffar Hussain <sjaffarhussain@xxxxxxxxx>
  • To: norman.dunbar@xxxxxxxxxxxxxxxxxxxxxxxxx
  • Date: Tue, 15 Dec 2009 19:27:11 +0300

Hi Norman,

Thanks for your invaluable suggestions and I will try to discuss your two
points with the developers. What they have told me that the problem could be
that a user might be trying the same transaction from different sessions, in
case one is not finished for any reason. Putting 60 seconds lock time out,
may they force to close the session or other action (I need to get more
details on this).

On Tue, Dec 15, 2009 at 5:18 PM, Dunbar, Norman <
norman.dunbar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Hi Syed,
>
> >> ... they have a SELECT FOR UPDATE and some other series of actions
> and then
> >> followed by an UPDATE command.
> This is fine, but as you can see from your problem, it leads to all
> sorts of enqueue problems. As I initially though, it is sounding a lot
> like "lazy developer syndrome" - but obviously, I can't be 100% sure!
> ;-)
>
> >> ...
>
> >> ...they are going to put the time out value at the end of
> >> SELECT .. FOR UPDATE command, probably 60 seconds time out
> >> for the lock.
> Well, this can lead to two separate options. The first is that whatever
> UPDATE they planned on doing will now fail because they were stuck on an
> enqueue wait for 60 seconds then it timed out.
>
> The second option is to wait on the enqueue for 60 seconds, then loop
> back and wait another 60 second.
>
> In the first case, the application is not processing as it should. In
> the second case, you have the same problem that you have now. Nothing
> has actually changed.
>
> So I'm a little puzzled as to how any of this solves your actual
> problem. Or are they planning on some other course of action when the
> WAIT 60 option times out?
>
>
> Cheers,
> Norman.
>
>
>
> Information in this message may be confidential and may be legally
> privileged. If you have received this message by mistake, please notify the
> sender immediately, delete it and do not copy it to anyone else.   We have
> checked this email and its attachments for viruses. But you should still
> check any attachment before opening it. We may have to make this message and
> any reply to it public if asked to under the Freedom of Information Act,
> Data Protection Act or for litigation.  Email messages and attachments sent
> to or from any Environment Agency address may also be accessed by someone
> other than the sender or recipient, for business purposes.  If we have sent
> you information and you wish to use it please read our terms and conditions
> which you can get by calling us on 08708 506 506.  Find out more about the
> Environment Agency at www.environment-agency.gov.uk
>
> Information in this message may be confidential and may be legally
> privileged. If you have received this message by mistake, please notify the
> sender immediately, delete it and do not copy it to anyone else.
>
> We have checked this email and its attachments for viruses. But you should
> still check any attachment before opening it.
> We may have to make this message and any reply to it public if asked to
> under the Freedom of Information Act, Data Protection Act or for litigation.
>  Email messages and attachments sent to or from any Environment Agency
> address may also be accessed by someone other than the sender or recipient,
> for business purposes.
>
> If we have sent you information and you wish to use it please read our
> terms and conditions which you can get by calling us on 08708 506 506.  Find
> out more about the Environment Agency at www.environment-agency.gov.uk
> --
> //www.freelists.org/webpage/oracle-l
>
>
>


-- 
Best Regards,

Syed Jaffar Hussain
Oracle Certified Master (10g)
http://www.oracle.com/technology/ocm/shussain.html
Oracle ACE
http://apex.oracle.com/pls/otn/f?p=19297:4:4640302666204919::NO:4:P4_ID:186
OCP 8i,9i & 10g DBA
RAC Certified Expert
Official Oracle RAC SIG Representative for Saudi Arabian region  (
http://www.oracleracsig.org/)
I blog at
http://jaffardba.blogspot.com/
LinkedIn : http://www.linkedin.com/pub/syed-jaffar-hussain/2/a71/918
--------------------
"Winners don't do different things. They do things differently."

Other related posts: