Subject | Re: [Firebird-general] ANN: FBTM V3 Screencast - Is Co-operative Garbage Collection causing statement execution slowdown? |
---|---|
Author | Ann Harrison |
Post date | 2013-11-30T21:13:31Z |
On Thu, Nov 28, 2013 at 3:41 AM, Thomas Steinmaurer <ts@...> wrote:
the same statement with the same execution plan is running much slower
on different occasions? Co-operative garbage collection in Firebird
Classic and SuperClassic might be the root cause.
Check out this demo how to get some feedback if garbage collection has
been additionally performed for an executed statement:
http://www.iblogmanager.com/download/demos/fbtm/fbtm_30_garbage_collection.htmErr ... sure, running with co-operative garbage collection makes the cost ofgarbage collection show up in the cost of running a statement. But the actualcost of garbage collection is about the same for co-operative and thread-basedmethods; the difference is that the thread-based doesn't show up as the costof a user's statement. In a single user system with long pauses betweenstatements, the thread-based garbage collector is a big win because it runsin the pauses. In a heavily loaded system where there is little or no idle time,the thread-based collector competes with useful work.As you know, when Firebird executes a delete statement, it actually createsa new short version of the record called a deleted stub. Once the delete ismature - meaning that no transactions expect to read the records that havebeen deleted - both the stub and the original version are removed. So theselect count(*) does more work than the delete that preceded it.One question is why you had to disconnect to force garbage collection...Cheers,Ann