Nonstop Database, HiRDB Version 9 Description
The following issues arise if BLOB data stored in a HiRDB server is to be retrieved by a client:
To mitigate such increases in the memory requirements associated with BLOB data retrievals, you can provide settings so that, instead of retrieved BLOB data being returned to the client, it is output to a unit in which either a single server or a front-end server is running. This means that only the server IP address and the file name need to be returned to the client. This is called the BLOB data file output facility.
The following figure provides an overview of the BLOB data file output facility.
Figure 6-15 Overview of the BLOB data file output facility
Use this technique to reduce memory requirements associated with BLOB data retrievals. This technique reduces the memory required for the client program and for inter-client communication buffers, at the expense of increased disk input/output time and capacity at the server. Therefore, if this technique is to be used, the tradeoff between memory requirements and disk input/output time must be evaluated.
Use of the BLOB data file output facility is specified in a WRITE specification of the SQL. A WRITE specification can be specified in either a cursor specification or a query specification. For details about WRITE specifications, see the manual HiRDB Version 9 SQL Reference.
The client can obtain as the SQL retrieval results only the IP address of the server, the BLOB data storage location that is set in the SQL, and the file name of the BLOB data. With this information, the client is able to identify the particular BLOB data stored at the server.
Shown as follows are examples of retrievals using the BLOB data file output facility.
Retrieve columns C1 and C2 from table T1. The system outputs the BLOB data from C1 to a file, and obtains the file name. The following figure shows an example of this retrieval using the BLOB data file output facility (retrieval of BLOB columns).
Figure 6-16 Example of a retrieval using the BLOB data file output facility (retrieval of BLOB columns)
From table T2, retrieve column ADT1 that makes the CONTAINS function TRUE. In this case, the BLOB value resulting from passing the column value to an argument of the EXTRACTS function is output to a file, and the file name is obtained. In this example, all entries are retrieved. The following figure shows an example of this retrieval using the BLOB data file output facility (retrieval of an abstract data type with the BLOB attribute).
Figure 6-17 Example of a retrieval using the BLOB data file output facility (retrieval of an abstract data type with the BLOB attribute)
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.