Subject | Re: Gap Value - What is normal behaivour |
---|---|
Author | Adam |
Post date | 2006-04-21T02:54:36Z |
--- In firebird-support@yahoogroups.com, "Craig Stevens"
<cstevens@...> wrote:
confused on this issue.
Oldest Transaction (aka Oldest Interesting Transaction or OIT) and
Oldest Active Transaction (OAT) is the gap you care about. Keep it
below 20000 or it is likely you have a transaction management problem.
Primarily, a transaction is an atomic unit of work. It takes as long
as it takes to do that work. Once that work is done, you commit or if
there is a problem, you rollback.
But while you are running a transaction, you need a stable view of
the database and therefore when records are changed, the old version
must linger around until you (and every other transaction that is or
could possibly look at that old version) has ended. When this is the
case, the garbage can be collected.
As Alan has pointed out, if you are running 10 transactions per day,
then it is not going to matter if your transactions last 1 hour. If
you are running 10 transactions a minute, then you may want to avoid
a 18 hour transaction.
Read this article for details of why and how:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_expert4
Adam
<cstevens@...> wrote:
>Next Transaction from the Gstat info, have i got this wrong? i do get
> Just to clarify-
>
> Im couting the gap as the difference between Oldest Active and the
confused on this issue.
Oldest Transaction (aka Oldest Interesting Transaction or OIT) and
Oldest Active Transaction (OAT) is the gap you care about. Keep it
below 20000 or it is likely you have a transaction management problem.
Primarily, a transaction is an atomic unit of work. It takes as long
as it takes to do that work. Once that work is done, you commit or if
there is a problem, you rollback.
But while you are running a transaction, you need a stable view of
the database and therefore when records are changed, the old version
must linger around until you (and every other transaction that is or
could possibly look at that old version) has ended. When this is the
case, the garbage can be collected.
As Alan has pointed out, if you are running 10 transactions per day,
then it is not going to matter if your transactions last 1 hour. If
you are running 10 transactions a minute, then you may want to avoid
a 18 hour transaction.
Read this article for details of why and how:
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_expert4
Adam