S
S
Sergey2015-08-02 23:22:09
Database design
Sergey, 2015-08-02 23:22:09

How to block records from being read in Firebird?

There is a query to fetch the first 10 records from a view:
select first 10 * from view1
How can I block these records from being read so that another client gets the next 10 records?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-08-03
@sezavasasilov

As always, I found the answer myself.
The following must be specified in the transaction parameters:
consistency
lock_read=TABLE1
lock_write=TABLE1
exclusive
wait

Works correctly, but slowly. Especially if the table is large and sorted (my case).
Maybe someone knows how to speed up all this disgrace?

A
AlexeyKovyazin, 2015-11-08
@AlexeyKovyazin

Could you reformulate the question, state it in more detail? It seems to me that the term "block" is used incorrectly - usually if something is blocked, then when you try to perform this action, an error is raised (which must be processed).
Judging by the second part of the question "How to block these records from being read so that another client gets the next 10 records?" - it's more about filtering the query result by users?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question