Lock Timeout

  • What is the recommended setting for SET LOCK_TIMEOUT in a OLTP system ?

  • I typically set this in the client app based on what's running. Usually set the connection to time out in 30 seconds, occasionally commands will be longer if I know that it will be slow.

    Andy

  • I agree with Andy 30 seconds should be sufficient but keep in mind this affects how long the current query and if a really long query is already running you may increase te number of lock timeouts that occurr so also consider what happens on average for the database in question.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • 3rd vote. Try 30 sec. If it causes problems, then adjust it.

    Steve Jones

    steve@dkranch.net

  • So SET LOCK_TIMEOUT should stay at the default of -1 (indefinite wait) in the database ?

  • Yes. One setting is never going to fit all circumstances.

    Andy

  • Deffinently stick with the default as is. Only adjust in the queries themselves if you find a need to.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply