dbTalk Databases Forums  

transaction logging on update

comp.databases.ingres comp.databases.ingres


Discuss transaction logging on update in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
paul.caffrey@gmail.com
 
Posts: n/a

Default transaction logging on update - 12-22-2008 , 05:08 AM






Hi

I know I can do a "copy.in" to a structured table which has no
secondary indexes and it is not logged.

I tried the same approach for an update but cannot seem to get it to
work.

I have
set autocommit on;
set nojournaling;
update ...

but even without secondary indexes it is being logged.

Is it possible to do updates without logging?

Regards

Reply With Quote
  #2  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] transaction logging on update - 12-22-2008 , 05:24 AM






Hi Paul,

Presumably you want to do this because the update logging is blowing
your log file apart.

You have a few options:
1. Set nojournaling on tablename; update tablename...; set journaling on
tablename.
This should improve the logging situation, but at the cost of
removing journaling from the table until the next checkpoint runs. You
should follow the update with a checkpoint.

2. set session with on_logfull=commit;
Everything gets logged, but when the transaction log file fills
up it autocommits what it has and then continues with the rest of the
update statement.

I find this to be the best option.

3. set nologging.
This is extremely dangerous. One error of any type and you are
up for a database recovery. If you absolutely must use it, take a backup
of the database first and then run the update using an exclusive
database lock. Once completed, take another backup of the database.

Martin Bowes

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
paul.caffrey (AT) gmail (DOT) com
Sent: 22 December 2008 11:08
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] transaction logging on update

Hi

I know I can do a "copy.in" to a structured table which has no
secondary indexes and it is not logged.

I tried the same approach for an update but cannot seem to get it to
work.

I have
set autocommit on;
set nojournaling;
update ...

but even without secondary indexes it is being logged.

Is it possible to do updates without logging?

Regards
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres


Reply With Quote
  #3  
Old   
John Dennis
 
Posts: n/a

Default Re: [Info-Ingres] transaction logging on update - 12-22-2008 , 05:32 AM



Paul, Marty,

The journaling state will make no difference to an update statement, as
all the updated rows need to be logged so they can be rolled back if the
transaction is aborted.

John

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Martin Bowes
Sent: Monday, 22 December 2008 10:24 PM
To: Ingres and related product discussion forum
Cc: paul.caffrey (AT) gmail (DOT) com
Subject: Re: [Info-Ingres] transaction logging on update

Hi Paul,

Presumably you want to do this because the update logging is blowing
your log file apart.

You have a few options:
1. Set nojournaling on tablename; update tablename...; set journaling on
tablename.
This should improve the logging situation, but at the cost of
removing journaling from the table until the next checkpoint runs. You
should follow the update with a checkpoint.

2. set session with on_logfull=commit;
Everything gets logged, but when the transaction log file fills
up it autocommits what it has and then continues with the rest of the
update statement.

I find this to be the best option.

3. set nologging.
This is extremely dangerous. One error of any type and you are
up for a database recovery. If you absolutely must use it, take a backup
of the database first and then run the update using an exclusive
database lock. Once completed, take another backup of the database.

Martin Bowes

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
paul.caffrey (AT) gmail (DOT) com
Sent: 22 December 2008 11:08
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] transaction logging on update

Hi

I know I can do a "copy.in" to a structured table which has no secondary
indexes and it is not logged.

I tried the same approach for an update but cannot seem to get it to
work.

I have
set autocommit on;
set nojournaling;
update ...

but even without secondary indexes it is being logged.

Is it possible to do updates without logging?

Regards
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres

_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres


Reply With Quote
  #4  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] transaction logging on update - 12-22-2008 , 05:36 AM



Quite correct. The difference between journaling and logging always
trips me up.

Marty

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of John
Dennis
Sent: 22 December 2008 11:32
To: Ingres and related product discussion forum
Subject: Re: [Info-Ingres] transaction logging on update

Paul, Marty,

The journaling state will make no difference to an update statement, as
all the updated rows need to be logged so they can be rolled back if the
transaction is aborted.

John

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
Martin Bowes
Sent: Monday, 22 December 2008 10:24 PM
To: Ingres and related product discussion forum
Cc: paul.caffrey (AT) gmail (DOT) com
Subject: Re: [Info-Ingres] transaction logging on update

Hi Paul,

Presumably you want to do this because the update logging is blowing
your log file apart.

You have a few options:
1. Set nojournaling on tablename; update tablename...; set journaling on
tablename.
This should improve the logging situation, but at the cost of
removing journaling from the table until the next checkpoint runs. You
should follow the update with a checkpoint.

2. set session with on_logfull=commit;
Everything gets logged, but when the transaction log file fills
up it autocommits what it has and then continues with the rest of the
update statement.

I find this to be the best option.

3. set nologging.
This is extremely dangerous. One error of any type and you are
up for a database recovery. If you absolutely must use it, take a backup
of the database first and then run the update using an exclusive
database lock. Once completed, take another backup of the database.

Martin Bowes

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
paul.caffrey (AT) gmail (DOT) com
Sent: 22 December 2008 11:08
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] transaction logging on update

Hi

I know I can do a "copy.in" to a structured table which has no secondary
indexes and it is not logged.

I tried the same approach for an update but cannot seem to get it to
work.

I have
set autocommit on;
set nojournaling;
update ...

but even without secondary indexes it is being logged.

Is it possible to do updates without logging?

Regards
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres

_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres

_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres


Reply With Quote
  #5  
Old   
Martin Bowes
 
Posts: n/a

Default Re: [Info-Ingres] transaction logging on update - 12-23-2008 , 08:54 AM



Hi Paul,



The 'on_logfull = commit' command allows the Ingres Transaction Log to
reach very high percentages and for the session that issued the command
to continue.



Anything else is in for a rocky ride...All the normal caveats about
Force Abort processing apply to those sessions. It can get nasty. I
normally only run on_logfull=commit on big batch programs run in off
peak times.



BTW. How big is your transaction Log file? If its <2G you may find its
just easier to expand the transaction log file to at least 2G. Be aware
that not all OS's support files of that size.



Another trick you could try is splitting the update into many smaller
updates on the basis of a key an committing each on.

eg update...where mod(a_key,10)<=5;commit; update...where
mod(a_key,10)>5; commit;



Marty



From: Paul Caffrey [mailtoaul.caffrey (AT) gmail (DOT) com]
Sent: 23 December 2008 14:45
To: Martin Bowes
Subject: Re: [Info-Ingres] transaction logging on update



Martin



Thanks for your response.



I hadn't seen the onlogfull=commit before

And I was wondering what kind of effect this might have on other
transactions at the time the logs actually fill? Will they suffer from
poor performance?



Regards



Paul

On Mon, Dec 22, 2008 at 11:24 AM, Martin Bowes
<martin.bowes (AT) ctsu (DOT) ox.ac.uk> wrote:

Hi Paul,

Presumably you want to do this because the update logging is blowing
your log file apart.

You have a few options:
1. Set nojournaling on tablename; update tablename...; set journaling on
tablename.
This should improve the logging situation, but at the cost of
removing journaling from the table until the next checkpoint runs. You
should follow the update with a checkpoint.

2. set session with on_logfull=commit;
Everything gets logged, but when the transaction log file fills
up it autocommits what it has and then continues with the rest of the
update statement.

I find this to be the best option.

3. set nologging.
This is extremely dangerous. One error of any type and you are
up for a database recovery. If you absolutely must use it, take a backup
of the database first and then run the update using an exclusive
database lock. Once completed, take another backup of the database.

Martin Bowes

-----Original Message-----
From: info-ingres-bounces (AT) kettleriver...ting (DOT) com
[mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of
paul.caffrey (AT) gmail (DOT) com
Sent: 22 December 2008 11:08
To: info-ingres (AT) kettleriverconsulting (DOT) com
Subject: [Info-Ingres] transaction logging on update

Hi

I know I can do a "copy.in" to a structured table which has no
secondary indexes and it is not logged.

I tried the same approach for an update but cannot seem to get it to
work.

I have
set autocommit on;
set nojournaling;
update ...

but even without secondary indexes it is being logged.

Is it possible to do updates without logging?

Regards
_______________________________________________
Info-Ingres mailing list
Info-Ingres (AT) kettleriverconsulting (DOT) com
http://www.kettleriverconsulting.com...fo/info-ingres





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.