eldconsumes the same number of bytes as the length of the value. A string value consumes
twiceas many bytes as the length of the value. These sizes are similar to what is described in the
SunStorageTek 5800 System Administration Guide, Table 7-6, Number of Bytes Used by Each
ElementType in a Schema Table.
Forexample, assume dynamic parameter 1 is bound to string "Hello"in the query
system.test.type_string=?.The parameter length would then be 12 bytes: 2 bytes overhead
plus10 bytes for a 5-character string parameter.
Conversely,note that in the query system.test.type_string like ’%Hello%’ thatthe
parameteris 16 bytes: 2 bytes overhead plus 14 bytes for a 7 character string regardless of the
declaredsize of the system.test.type_string eld in the schema.
For the query system.test.type_date = {date ’2007-01-1’} AND
system.test.type_char=’Hello’,the parameter length is 13 bytes: 2 bytes overhead for each
oftwo query values plus 4 bytes for a date literal plus 5 bytes for a 5-character char parameter.
Limit the Size of Schema Query Parameters and Literals
Whendesigning a schema, limit the sizes of elds so that planned queries will t within the size
limits.Most simple queries on a single table will t within the 8000-byte limit. This is because
thetable row denition itself must t within the similar 8080-bytes for overall table row size.
Alsonote that complex queries on even a single table (such as queries involving many OR
clauses)may overow the limit. Schema design and query design must work together carefully
ifcomplex queries are an important part of the application.
Forfurther information, see “Query Size Limit” on page 127.
Limit Results PerFetch
Queriesshould use a reasonable value of “results per fetch” when a large total result set size is
expected.The maximum result size should not exceed the memory allocated for the query
engineon the server side. If it does, then the query will fail. Dropping the query result size will
allowthe query to succeed.
Ifyou incorrectly estimate how much memory will be used by the result set, the server will not
failgracefully with an appropriate error message, but will instead run out of memory.
Suggestedvalues are in the 2000-5000 range. Set maxFetchSize = 4098 as an argument to the
querymethod.
Limitthe Sizeof Schema Quer y Parametersand Literals
SunStorageTek5800 System Client API Reference Manual June2008128