Interstage Shunsaku Data Manager Application Development Guide - Microsoft(R) Windows(R) 2000/ Microsoft(R) Windows Server(TM) 2003 - - UNIX -
Contents Index PreviousNext

Appendix C Allowable Values

C.2 Allowable Values for Sort Requests

The following table lists the allowable values associated with sort requests.

[Table C-2 Allowable Values Relating to Sort Requests]

Item

Allowable value

Remarks

Maximum number of keys that can be specified

8

-

Sort expression

From 1 to 65, 535 bytes (excluding \0)

-

Total sort key length

1 to 2,000 bytes

The total sort key length is the total length of all the sort keys in key specifications.
Refer to Relationship between the Total Sort Key Length and the Total Number of Items that Can be Returned for more information on how the total sort key length affects the number of items that can be returned.

Number of characters when the rlen function is specified as the key

1 to 128

The length of the character string resulting from the rlen function is shown in the table entitled Relationship between character code and the length of the string resulting from the rlen function.

Number of items that can be returned

100 to 1,000 records

When the total length of sort keys is 200 bytes or less, the records corresponding to the top 1,000 items can be returned.
If the total length of sort keys exceeds 200 bytes, the number of records that can be returned is indicated in Relationship between the Total Sort Key Length and the Total Number of Items that Can be Returned.

mark1Relationship between the Total Sort Key Length and the Total Number of Items that Can be Returned

The total sort key length is the total length of all the sort keys in key specifications. The length of each key is determined by the key specification format, as shown in the following table.

[Table C-3 Determining Key Length]

Key specification format

Length of sort key

Remarks

val function

16 bytes

-

Text format

20 bytes

The first 20 bytes are used as the sort key. To sort using a string that is longer than 20 bytes, specify the rlen function as the key specification of the sort expression. By specifying the rlen function, it becomes possible to perform a sort using up to 128 characters as a sort key.

rlen function

The length of the character string resulting from the rlen function is shown in the table entitled Relationship between character code and the length of the string resulting from the rlen function.

-

The character code of the director data determines the byte length of each character of the character string produced by the rlen function, as shown below.

[Table C-4 Relationship between Character Code and the Length of the String Resulting from the rlen Function]

Character code

No. of bytes per character

Example

UTF-8

4 bytes

rlen(/root/name/text(),50) would be treated as 200 bytes.

GB18030

SHIFT-JIS

2 bytes

rlen(/root/name/text(),50) would be treated as 100 bytes.

GB2312

big5

KSC5601

EUC

3 bytes

rlen(/root/name/text(),50) would be treated as 150 bytes.

The following table shows how the total sort key length affects the number of records that Shunsaku can return.

[Table C-5 Relationship between Total Sort Key Length and the Number of Items that can be Returned by Shunsaku]

Total sort key length (bytes)

Number of items that can be returned

1 to 200

1,000

201 to 300

700

301 to 400

500

401 to 500

400

501 to 700

300

701 to 1,000

200

1,001 to 2,000

100


Contents Index PreviousNext

All Rights Reserved, Copyright(C) FUJITSU LIMITED 2006