Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.0 » SQL Anywhere Server - SQL Usage » Designing and Creating Databases » Using transactions and isolation levels » Choosing isolation levels

 

Reducing the impact of locking

You should avoid running transactions at isolation level 3 whenever practical. They tend to place a large number of locks and hence impact the efficient execution of other concurrent transactions.

When the nature of an operation demands that it run at isolation level 3, you can lower its impact on concurrency by designing the query to read as few rows and index entries as possible. These steps will help the level 3 transaction run more quickly and, of possibly greater importance, will reduce the number of locks it places.

In particular, you may find that adding an index may greatly help speed up transactions, particularly when at least one of them must execute at isolation level 3. An index can have two benefits:

  • An index enables rows to be located in an efficient manner
  • Searches that make use of the index may need fewer locks.

For more information about the details of the locking methods employed by SQL Anywhere is located in How locking works.

For more information about performance and how SQL Anywhere plans its access of information to execute your commands, see Monitoring and improving performance.