Return first n rows with skip locked.
964820Sep 27 2012 — edited Sep 28 2012Timesten is used from Java using client-server access. We have to replicate rows from TimesTen to another database.
We have parallel job processing rows. While processing, rows are locked:
SELECT FIRST N * FROM TABLE_X FOR UPDATE
The problem is that the first job selects and locks first n rows and other job have to wait until locks are released. Is it possible to skip locked rows, so other jobs would select another set of rows.
With Oracle this can be accomplished using SKIP LOCKED clause. With SQL Server using WHERE Locked IS NULL clause.
Is possible to have this kind of behavior in TimesTen?
Is there some other alternative for replicating rows? XLA API seems to be for this, but it seems a little bit complicated and we have to use direct-access, which is not suitable for our setup.
Thanks