Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: logging with Text/Image fields
Date: Jan 24 2002 10:10PM

Monty Charlton writes:
 > It appears that using dbpreptext() and dbwritetext() allow you to turn 
 > logging on and off.  I heard from someone that turning logging on can 
 > increase performance when selecting and inserting text & image fields.  This, 
 > personally, sounds counter intuitive, but I figured it's worth trying.

I sincerly doubt that having logging turned on will speed up
inserts/updates. Logging has no effect for selecting the data, of course.

 > I'm using ct_get_data() and ct_send_data() for my image & text work.  Is it 
 > possible to turn logging on with either of these?

See the man page:

       $ret = $dbh->ct_data_info($action, $colnum [, \%attr [,
               When $action is CS_GET ct_data_info() retrieves a
               CS_IODESC struct for column $colnum. The CS_IODESC
               struct is stored internally in the $dbh, and
               stores the text pointer, the total length and
               whether logging should be turned on for updates.

               The %attr hash can be used to set the total_txtlen
               and log_on_update fields of the CS_IODESC by set-
               ting the corresponding fields in the %attr param:

                       %attr = ( total_txtlen => 1024, log_on_update => 1 );
                       $dbh->ct_data_info(CS_SET, $colnum, \%attr);

Michael Peppler - Data Migrations Inc. - -
International Sybase User Group -