physical log problem
Posted in 2009
Topics: Logging & Checkpoints
Recently I did a testing, the testing application execute three different SQL,
1 Insert and 2 updates, For every transaction the application insert into the
table a record, and update that record two times, but it update different
columns, I see the physical log didn't increase basicly through 'onstat -l ',
do anybody explain where the before image of the update SQL write? I feel it
isn't in the physical log file.
Read the description of the physical log in the Administrator's Guide. The
physical log holds an image of any pages modified between checkpoints, but
ONLY the original unmodified image. This is not used for rollback, but only
to create a clean slate starting point for logical log rollforward after a
crash between checkpoints. It allows the logical logs to be rolled forward
against clean original pages from the point of the last checkpoint to the
end of the logical log. When the end of the logical logs is reached during
fast recovery after a crash, uncommitted transactions are rolled back.
The incremental pre-images that you are looking for are in the logical log,
not the physical log. However, unless you are using Enterprise Replication
with uncompressed logging, the preimages only contain the preimages of
columns that are modified, not the entire row. See the Enterprise
Replication Guide for details on that difference.
Art
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Mon, May 11, 2009 at 10:45 AM, CHUAN LU <luchuan114@sina.com> wrote:
> Recently I did a testing, the testing application execute three different
> SQL,
> 1 Insert and 2 updates, For every transaction the application insert into
> the
> table a record, and update that record two times, but it update different
> columns, I see the physical log didn't increase basicly through 'onstat -l
> ',
> do anybody explain where the before image of the update SQL write? I feel
> it
> isn't in the physical log file.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--001636c5ab5ba442430469a43e24
Sometimes before images for updates are stored in the logical log. This is
often
referred to as delta logging. Only the before and after image differences
in the row
are stored. This way if you have a 1KB row but only update 8 bytes there
is only 16 bytes
of row data stored instead of entire 1KB row.
John F. Miller III
STSM, Support Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 05/11/2009 07:45:03 AM:
> [image removed]
>
> physical log problem [15712]
>
> CHUAN LU
>
> to:
>
> ids
>
> 05/11/2009 07:46 AM
>
> Sent by:
>
> ids-bounces@iiug.org
>
> Please respond to ids
>
> Recently I did a testing, the testing application execute three
> different SQL,
> 1 Insert and 2 updates, For every transaction the application insertinto
the
> table a record, and update that record two times, but it update different
> columns, I see the physical log didn't increase basicly through 'onstat
-l ',
> do anybody explain where the before image of the update SQL write? I feel
it
> isn't in the physical log file.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>