472,353 Members | 1,057 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Table & Tablespace size

About to create a table which will "include" a BLOB. Am not sure how
large to make the container and the tablespace.

What I see says that BLOB is stored "separately." However, I don't
know where.

With a table kinda like:

CREATE TABLE BLOB_TABLE (
BLOB_ID INT,
BLOB_NAME VARCHAR(100),
BLOB_IMAGE BLOB(10M),
BLOB_TYPE VARCHAR(10),

What size tablespace should be used? bufferpool? how should I figure
the table size?

Where is the BLOB in fact?
Nov 12 '05 #1
2 10115
Stanley, the answer as usual is it depends:
1) The LOB data never goes to a buffer pool. When the lob is retrieved,
one by one, it goes to application private memory for the coordinator
agent of your appl. I believe it will be in the aslheapsz or Appl. Supp.
Layer Heap Size.
2) If SMS Tblspc.
The BLOBs will be stored in a separate file SQL000nn.LB with an file
allocator file named SQL000nn.LBA in the container directory of the
tblspc. the 000nn correlates to the tableid entry in the syscat.tables,
tableid column.
3) If DMS tablespace, in the same tblspc as the data, they will be
stored in different extents of the tblspc. than what is used by the data
pages. "CREATE TABLE MYSTUFF .... IN DMSTBSP"
4) If DMS tablespace, different than the table, the tblspc will be
defined as a "long tablespace".
"CREATE TABLE MYSTUFF .... IN DMSTBSP LONG IN DMSLOGTBSP"

Assuming every row has a blob, its pointer is about a 100 bytes (more
complex than that but work with this), then your row size is roughly 215
bytes. Build the table and use the control center size estimator to
figure out the table size. The blobs, I guess you figure an average
size for them, multiply by expected row number and come up with the
additionnal size to add to the SMS tblsp or DMS tblsp or for the
separate tblspc. I seem to remember a technique to do this.

It's late and I'll try to look for it and send it to you.
Regards, Pierre.

Stanley Sinclair wrote:
About to create a table which will "include" a BLOB. Am not sure how
large to make the container and the tablespace.

What I see says that BLOB is stored "separately." However, I don't
know where.

With a table kinda like:

CREATE TABLE BLOB_TABLE (
BLOB_ID INT,
BLOB_NAME VARCHAR(100),
BLOB_IMAGE BLOB(10M),
BLOB_TYPE VARCHAR(10),

What size tablespace should be used? bufferpool? how should I figure
the table size?

Where is the BLOB in fact?


--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #2
Stanley, the answer as usual is it depends:
1) The LOB data never goes to a buffer pool. When the lob is retrieved,
one by one, it goes to application private memory for the coordinator
agent of your appl. I believe it will be in the aslheapsz or Appl. Supp.
Layer Heap Size.
2) If SMS Tblspc.
The BLOBs will be stored in a separate file SQL000nn.LB with an file
allocator file named SQL000nn.LBA in the container directory of the
tblspc. the 000nn correlates to the tableid entry in the syscat.tables,
tableid column.
3) If DMS tablespace, in the same tblspc as the data, they will be
stored in different extents of the tblspc. than what is used by the data
pages. "CREATE TABLE MYSTUFF .... IN DMSTBSP"
4) If DMS tablespace, different than the table, the tblspc will be
defined as a "long tablespace".
"CREATE TABLE MYSTUFF .... IN DMSTBSP LONG IN DMSLOGTBSP"

Assuming every row has a blob, its pointer is about a 100 bytes (more
complex than that but work with this), then your row size is roughly 215
bytes. Build the table and use the control center size estimator to
figure out the table size. The blobs, I guess you figure an average
size for them, multiply by expected row number and come up with the
additionnal size to add to the SMS tblsp or DMS tblsp or for the
separate tblspc. I seem to remember a technique to do this.

It's late and I'll try to look for it and send it to you.
Regards, Pierre.

Stanley Sinclair wrote:
About to create a table which will "include" a BLOB. Am not sure how
large to make the container and the tablespace.

What I see says that BLOB is stored "separately." However, I don't
know where.

With a table kinda like:

CREATE TABLE BLOB_TABLE (
BLOB_ID INT,
BLOB_NAME VARCHAR(100),
BLOB_IMAGE BLOB(10M),
BLOB_TYPE VARCHAR(10),

What size tablespace should be used? bufferpool? how should I figure
the table size?

Where is the BLOB in fact?


--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: xixi | last post by:
There is one thing I don't understand, I have default tablespace userspace1 is database managed type, with total freepages 506048. another one...
4
by: maricel | last post by:
Could someone confirm which tablespace is being used when running ALTER & CREATE INDEX. Is it the tempspace or the tablespace where the table...
0
by: Stanley Sinclair | last post by:
About to create a table which will "include" a BLOB. Am not sure how large to make the container and the tablespace. What I see says that BLOB...
1
by: Kums | last post by:
I have a 4K page size table space, and it has just multiple tables. (I need to know as well if it's a single table in that tablespace, how to...
6
by: gimme_this_gimme_that | last post by:
I'm new to DB2 ... The following statement results in a SQL1585N message : "A system temporary table space with sufficient page size does not...
1
by: Raja Shekar | last post by:
HI Every body , I would like to know whether is it mandatory to give Tablespace page size and Bufferpool page size equal..? i also heard like while...
2
by: rAinDeEr | last post by:
Hi, I have Db2 9 installed in Windows. Am trying to create a table with the following DDL CREATE TABLE DB2N.T_CO ( a1 VARCHAR(100) NOT...
2
by: Woody Ling | last post by:
I am now using db2 v8.2 64bits without DPF. I want to create a very large table which is about 1000G and the record length is suitable for 32K page...
6
by: shawno | last post by:
Hi, We're running DB2 v8.1 on a windows platform and have a database that is quite large. It basically contains one table with a BLOB field...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.