You can combine the techniques described in Chapter 5. "Writing Stored Procedures", and "Row Blocking" to significantly improve the performance of applications which need to pass large amounts of data across a network.
Applications that pass arrays, large amounts of data, or packages of data across the network can pass the data in blocks using the SQLDA data structure or host variables as the transport mechanism. This technique is extremely powerful in host languages that support structures.
Either a client application or a server procedure can pass the data across the network. It can be passed using one of the following data types:
It can also be passed using one of the following graphic types:
See "Data Types" for more information about this topic.
Note: | Be sure to consider the possibility of character conversion when using this
technique. If you are passing data with one of the character string
data types such as VARCHAR, LONG VARCHAR, or CLOB, or graphic data types such
as VARGRAPHIC, LONG VARGRAPHIC, OR DBCLOB, and the application code page is
not the same as the database code page, any non-character data will be
converted as if it were character data. To avoid character conversion,
you should pass data in a variable with a data type of BLOB.
See "Conversion Between Different Code Pages" for more information about how and when data conversion occurs. |