If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
If the data was less than about 32K, you could use the following for better performance, but you will need a 32K bufferpool, tablespace, and system temporary tables:
1. VARCHAR
2. VARCHAR FOR BIT DATA
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
You would use BLOB for binary data (including a PDF), and CLOB for text data. Performance will not as good as regular data since LOB's do not use DB2 bufferpools (memory caching of DB2 tables) and will require synchronous disk I/O required for read and writes. But it may not be that bad depending on your requirements.
Best option is to define a separate 32K tablespace for LOB's and then use it the Create Table command ("LONG IN TS_XXXX" -- see Create Table command in manual), and make sure that file caching is turned on for that tablespace where the LOB's reside. If the LOB will not ever (or only rarely) be updated after it is inserted (deleted is a separate issue), then use the COMPACT keyword when defining the LOB column.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
If you have a bunch of small files (smaller than 32K), you can wrap the BLOB inside a structured type and use a large INLINE LENGTH for that type. This will allow you to exploit the buffer pool for short BLOBs (< 32K) while everything longer is treated as a regular BLOB with disk I/O.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development