BLOCK FACTOR

Bulk loading data using the LOAD TABLE statement

Only one single-byte character can be used as an escape character.

Note Because you must specify ESCAPES OFF in this version of Adaptive Server IQ, the ESCAPE CHARACTER option has no effect. It is provided for compatibility with Adaptive Server Anywhere.

WITH CHECKPOINT ON clause If this option is set to ON, a checkpoint is issued when the LOAD TABLE statement completes and is logged. In the event recovery is required, it is guaranteed even if the data file is then removed from the system.

If WITH CHECKPOINT ON is not specified, the file used for loading must be retained in case recovery is required.

BLOCK SIZE option Specifies the default size in bytes in which input should be read. This option only affects variable-length input data read from files; it is not valid for fixed-length input fields. It is similar to BLOCK FACTOR, but there are no restrictions on the relationship of record size to block size. You cannot specify this option along with the BLOCK FACTOR option.

The default setting for BLOCK SIZE is 500,000, which is high enough for input from disk files. For tape files, you should specify the same block size that was used when creating the tape. You cannot specify BLOCK SIZE along with

or with any fixed width input fields.

Example

The following UNIX example specifies a BLOCK SIZE of 200,000 bytes:

LOAD TABLE mm (l_orderkey ’\x09’, l_quantity ’\x09’,

l_shipdate DATE(’YYYY/MM/DD’)) FROM ’/d1/MILL1/tt.t’

BLOCK SIZE 200000

 

BYTE ORDER option

Specifies the byte ordering during reads. This

 

option applies to all binary input fields, including those defined as PREFIX 2

 

or PREFIX 4. If none are defined, this option is ignored. Adaptive Server IQ

 

always reads prefix binary data in the format native to the machine it is running

 

on (default is NATIVE). You can also specify:

 

HIGH when multibyte quantities have the high order byte first (for big

 

endian platforms like Sun, IBM AIX, HP, and Silicon Graphics IRIX).

 

LOW when multibyte quantities have the low order byte first (for little

 

endian platforms like DEC ALPHA, and Windows NT).

Example

Here is a Windows NT example:

182

Page 202
Image 202
Sybase 12.4.2 manual Specifies the byte ordering during reads. This, On default is NATIVE. You can also specify, 182