Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / Informix Topics / May 2008

Tip: Looking for answers? Try searching our database.

Understanding the Logical Log Usage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Krishna - 27 May 2008 13:05 GMT
Am using version 10.00.UC7X1 and have a few *basic* questions on the
usage of the logical log file.
The database has a logging mode of unbuffered logging with a page size
is 2048 bytes (as returned by onstat -b). I have 3 log files with each
file being 5000 KB in size.

I have a table with the following definition:
sizetbl (i lvarchar(255), j lvarchar(3000), k lvarchar(255), m
lvarchar(2500));

I observe that for an insert of a single row, one page is used in the
logical log (based on onstat -l). The insert just inserts single
characters:

insert into sizetbl values ('1','2','3','4');

1. Why does one page get used in the logical log for each insert?
onstat -l displays parameters called numrecs and numpages. The
documentation says: numrecs: Is the number of records written;
numpages: Is the number of pages written

For the above operation, I observe that for each insert the numrecs
gets incremented by three whereas the numpages gets incremented by 1.
What does the term "records" mean in this context?

2. onlog displays a length of 44 (for begin) + 64 (for hinsert) + 40
(for commit) for a transaction involving a single insert. What does
this length mean? The length of the logical record in bytes?

Thanks a lot in advance!
jprenaut@yahoo.com - 27 May 2008 14:06 GMT
> Am using version 10.00.UC7X1 and have a few *basic* questions on the
> usage of the logical log file.
[quoted text clipped - 16 lines]
> documentation says: numrecs: Is the number of records written;
> numpages: Is the number of pages written

The key to the answer of this question is the fact that you are using
unbuffered logging.  So that as soon as a commit work is hit, it
forces the logical log buffer to be flushed to disk.  When this
occurs, it will only use the portion of a page that is needed, so you
will possibly end up with non-full logical log pages.

> For the above operation, I observe that for each insert the numrecs
> gets incremented by three whereas the numpages gets incremented by 1.
> What does the term "records" mean in this context?

Logical log records.  As you mention below, you have 3 log records, 1
for the begin, 1 for the hinsert and 1 for the commit.

> 2. onlog displays a length of 44 (for begin) + 64 (for hinsert) + 40
> (for commit) for a transaction involving a single insert. What does
> this length mean? The length of the logical record in bytes?

Yes

> Thanks a lot in advance!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.