Subject | Locking and disk activity |
---|---|
Author | benedicte_asselin |
Post date | 2005-02-11T21:02:43Z |
Hello,
i need to lock several rows of a table and this process is used very
frequently in my system. I use the embedded version of firebird on
windows but I want to port my app to Mac and some Unixes (and if i
remember well embedded did not exist yet on some OSs?).
i use statements like this to lock the rows I need:
SELECT mycolumns FROM thetable WHERE thekey=? FOR LOCK
do such locks involve WRITE disk activity (if I do not actually
modify the raw)?
if I have several rows to lock at a time, may I win time by making
a 'in (key1, key2...)' and prepare a new statement and execute it
rather than executing several one-by-one statement? or by preparing
a fixed size 'in (?,?,?,?)' statement and execute locks by packets?
if I lock by packets, is there any way to be sure that my objects
will be locked in a specific order ? using a ORDER BY for example ?
Regards,
Armel
i need to lock several rows of a table and this process is used very
frequently in my system. I use the embedded version of firebird on
windows but I want to port my app to Mac and some Unixes (and if i
remember well embedded did not exist yet on some OSs?).
i use statements like this to lock the rows I need:
SELECT mycolumns FROM thetable WHERE thekey=? FOR LOCK
do such locks involve WRITE disk activity (if I do not actually
modify the raw)?
if I have several rows to lock at a time, may I win time by making
a 'in (key1, key2...)' and prepare a new statement and execute it
rather than executing several one-by-one statement? or by preparing
a fixed size 'in (?,?,?,?)' statement and execute locks by packets?
if I lock by packets, is there any way to be sure that my objects
will be locked in a specific order ? using a ORDER BY for example ?
Regards,
Armel