Table Insertion logging

Andrew Allen (aja@cad.vmss.gmeds.com) wrote:
: When ingres executed the create table statement, as you wrote it,
: ingres did not create logfile entries for your transaction.  Why?

I'm sure that Ingres does *minimal* logging rather than *no* logging for 
this kind of statement. The create table stmt itself won't fill the log file
up, but because it has a log entry (~500 bytes) it will hold the log file
start point up until it has completed. ie meanwhile other transactions will
be logged, and possibly fill the log-file up - the same way that an
uncommitted transaction would.

: Becuase if the transaction failed ingres would only need to drop
: the table you were creating in order to return the database to its
: former state.  In situations such as you describe you might try
: the followin to avoid the logging system:
: 1. create a temporary table as you have done.
: 2. drop the original table as you have done.
: 3. create the new version of the new table as a select from the
: 	temporary table including the new columns in their
: 	appropriate positions.

It should be noted here that a 'create table xxx as select ...' statement
will create a table where all the fields have '...NOT DEFAULT', even if the 
source table's fields are '... WITH DEFAULT'. Be warned! :-)

: 4. remod the new table to the desired structure.

: or
: 1. bake a backup copy of the original table, as you have done.
: 2. unload the original table in ascii format.
: 3. drop the original table
: 4. modify the copy.in to create the new version of the table with
: 	the new structure.
: 5. run the copy.in sql script, through the sql monitor.


Alright, so maybe I'm being pedantic here...  just drop me a line if you
violently disagree!

Cheers,
Jeff

PS - both comments come from 'experience' ;-)
----- -== FISHER & PAYKEL - The Innovators ==- -----
Jeff Wong                   | Fisher & Paykel         
AP, DBA, Dogsbody           | Information Systems     
wongjf@fp.co.nz (internet)  | Private Bag 17          
Fax +64 9 273 0629          | Panmure                 
Ph  +64 9 273 0620 x6021    | Auckland, New Zealand               
----------------------------------------------------
Ingres Q & A
To William's Home Page

© William Yuan 2000

Email William