Subject Re: Transactions and cleaning up of rows after a massive deletion
Author fernnaj
Hello Ann,

Thank you so much for your prompt answer! A few questions follow...

> In SuperServer, all queries are
> threads in the server process which schedules them on a round-robin basis,
> giving each a quantum of time. So again, the inserts will be slower than
> normal, but will not run while the garbage is being collected.

We're using Firebird 2.1.3 for Windows. and the process running is fbserver.exe, so I understand we are using SuperServer.

The last bit "will not run while the garbage is being collected" can have two meanings for me. One is that the insert will be blocked completely until the garbage collector finishes the cleaning of 1 million rows for the other transaction; the other is that the garbage collector will clean a bit now, a bit later (blocking the first query), and in between the other transactions (= my insert) are scheduled and performed and finished.

I hope the second option is the correct one... right?

A side question: if you run two selects concurrently that happen to "go through" the same garbage, how will the garbage collection work? I assume that, if the answer to the other question is that the garbage collector cleans a bit now, a bit later, then both selects will take long and the garbage collector will be invoked sometimes by the first query, sometimes by the second, until both have a clean set to work with... is it so?

...which leads me to the third question: would my plain "insert into () values ()" query "provoke" the garbage collection?

Thanks a lot for your help!

Regards, Fernando