on 06-22-2022 11:54 AM
Hello,
Could you please provide confirmation as to whether "skip locked" is supported in SAP ASE 16 or not? It is used with select for update query in other databases. is there any alternative in SAP ASE 16?. If "skip locked" is not supported, is "read past" an alternative to that?
Regards
AJ
Looking back through all of the manuals I have I can confirm that readpast has been available since ASE 12.5.1 and that dates back almost 2 decades (readpast may have been available in earlier 12.0, 10.x and 4.x versions but I just don't have those manuals in front of me).
Current ASE 16.0 documentation:
Transact-SQL Guide: Readpast Locking for Queue Processing
Refernece Manual: Commands (see entries for select, delete, insert, readtext, update, writetext)
If this doesn't answer your question then please update your post with more details of what you're looking for. An example of how readpast doesn't do what you want would also be helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) the phrase skip locked does not show up anywhere in the ASE documentation; you haven't told us what skip locked is or shown how it's used so I ran a quick web search and reviewing a couple hits it appears (to me) that skip locked is the same as ASE's readpast
2) in addition to the link I provided earlier (re: Transact-SQL Guide: Readpast Locking for Queue Processing) see Reference Manual: Commands (select - Using select for update) and Reference Manual: Commands (select - Using readpast)
3) in a nutshell: select for update obtains exclusive locks on rows processed by the select (the assumption being that a follow-on query is going to modify said locked rows); readpast allows the select to read past (ie, skip over) any locks held by other processes (without readpast the select would stop and wait for the locks, held by other processes, to be released)
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.