Sybase 12.4.2 User Manual

Page 201

Advertising
background image

CHAPTER 5 Moving Data In and Out of Databases

181

You can specify load options in any order. Syntax for load-options is as
follows:

[ { BLOCK FACTOR

number | BLOCK SIZE number } ]

... [ BYTE ORDER { NATIVE | HIGH | LOW } ]
... [ LIMIT

number-of-rows ]

... [ NOTIFY

number-of-rows ]

... [ ON FILE ERROR { ROLLBACK | FINISH | CONTINUE} ]
... [ PREVIEW { ON | OFF } ]
... [ ROW DELIMITED BY

delimiter-string’ ]

... [ SKIP

number-of-rows ]

... [ START ROW ID

number ]

... [ UNLOAD FORMAT ]

Each of these options is described briefly below. For details of all options of
the

LOAD TABLE

statement, see the Adaptive Server IQ Reference.

BLOCK FACTOR option

Specifies blocking factor, or number of records

per block, used when a source was created. This option is not valid for
insertions from variable length input fields; use the

BLOCK SIZE

option

instead. However, it does affect all file inserts (including from disk) with fixed
length input fields, and it can affect performance dramatically.

The default setting for

BLOCK FACTOR

is 10,000. Higher block factors

generally improve the speed of I/O operations. However, consider the
following when setting this option:

If your source is a disk file, memory considerations will determine the best
setting for your system.

If your source is a tape, either use the same blocking factor that was used
when creating the tape (for best performance) or a blocking factor that is
evenly divisible into it.

Adaptive Server IQ rejects the insert operation if you specify a

BLOCK

FACTOR

of zero.

You cannot specify

BLOCK FACTOR

along with

BLOCK SIZE

or with any

variable-width input fields.

ESCAPE CHARACTER option

Specifies an alternative escape character.

The default escape character for characters stored as hexadecimal codes and
symbols is a backslash (\), so that \x0A is the linefeed character, for example.

This can be changed using the

ESCAPE CHARACTER

clause. For example, to

use the exclamation mark as the escape character, you would enter:

... ESCAPE CHARACTER ’!’

Advertising