I am writing an app that pull data from a sybase table rather frequently. Since I will not write any data back to the database, I want to increase the read performance by not holding data locks on the target table.
In MSSQL I can do it via table hint NOLOCK. Is there a equivalent in the Sybase T-SQL?
First, let me say that it's not recommended to use NOLOCK.
I believe the locking hint you are looking for is noholdlock
or at isolation
, but the syntax varies depending on if you are trying to use it at the session level, the query level, or for specific tables within a query.
The full explanation can be found here in the Locking and Concurrency Control documents from Sybase.