Previous Topic

Next Topic

[No]Logging

The set nologging statement allows a database administrator to bypass the logging and recovery system. This can be speed up certain types of batch update operations but must always be used with extreme care.

The set nologging statement is intended to be used solely for large database load operations for which the reduction of logging overhead and log file space usage outweigh the benefits of having the system recover automatically from update errors.

Previous Topic

Next Topic

Set Nologging

To disable transaction logging, issue the following set statement:

set nologging

When transaction logging is disabled, the standard Ingres tools and procedures cannot be used to recover from transaction errors. Any error that occurs when the database is being updated (including interrupts, deadlock, lock timeout, and forced abort), or any attempt to rollback a transaction causes the DBMS Server to mark the database inconsistent.

To use the set nologging option, the DBA must:

Caution! Do not use the set nologging statement in an attempt to improve performance during everyday use of a production database.

Previous Topic

Next Topic

Set Logging

To reenable transaction logging, issue the following set statement:

set logging

This set statement can only be issued by the DBA of the database on which the session is operating and cannot be issued within a multi-statement transaction. After set logging is executed, automatic database recovery is again guaranteed.

If set nologging is used on a journaled database, take a new checkpoint immediately after completion of the set nologging operations to establish a new base from which to journal updates.

When a session in set nologging mode disconnects from a database, the DBMS Server executes a set logging operation to bring the database to a guaranteed consistent state before completing the disconnect.

Previous Topic

Next Topic

[No]Optimizeonly

Specifies whether query execution halts after the optimization phase. To halt execution after the query has been optimized, specify set optimizeonly. To continue query execution after the query is optimized, specify set nooptimizeonly. To view query execution plans (QEP's) without executing a query, use set optimizeonly in conjunction with set qep.

Previous Topic

Next Topic

Connection

The set connection statement switches the current session to a database connection previously established using the connect statement. To determine the current connection name, use the dbmsinfo(connection_name) statement.

Issuing the set connection none statement results in the state being identical to prior to the first connect statement or following a disconnect statement: no current session.

Previous Topic

Next Topic

Work Locations

The set work locations statement adds, removes, or changes the set of (disk and directory) locations that the DBMS Server uses for sorting. Sorting can occur when queries are executed (select or fetch statements with order by clauses) or tables are restructured (for example, using the modify statement). Work locations are defined using the create location statement.

To add work locations to the list of locations currently in use, issue the set work locations add statement and specify the locations to be added. To remove locations from the set of locations currently in use, issue the set work locations drop statement. To replace the set of locations currently in use, issue the set work locations use statement. The work locations you specify are in effect for the duration of the session.

For details about configuring your installation to improve the performance of sorting, see the Database Administrator Guide.

Previous Topic

Next Topic

Update_Rowcount

The set update_rowcount statement specifies the nature of the value returned by the inquire_sql(rowcount) statement. Valid options are:

For example, for the following table:

column1

column2

column3

Jones

000

green

Smith

000

green

Smith

000

green

and the following query:

update test_table set column1 = 'Jones'
where column2 = 000 and column3 = 'green';

The DBMS Server, for reasons of efficiency, does not actually update the first row because column1 already contains Jones; however, the row does qualify for updating by the query.

For the preceding query, if the update_rowcount option is set to changed, inquire_sql(rowcount) returns 2 (the number of rows actually changed), but if the update_rowcount option is set to qualified, inquire_sql(rowcount) returns 3 (the number of rows that qualified to be changed).

To determine the setting for the update_rowcount option, issue the select dbmsinfo('update_rowcnt') statement.


© 2007 Ingres Corporation. All rights reserved.