473,386 Members | 1,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 10205
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 called tmpxx is DMS type too, with 525120 free pages....
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 resides? Many thanks, maricel
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 is stored "separately." However, I don't know...
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 handle.) It has reached the maximum size of 64 GB...
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 exist" Note that the column FIELD_DETAIL is a...
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 creating tablespace if pages size of tablespace...
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 NULL, b1 VARCHAR(255), c1 VARCHAR(255), d1 ...
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 size. I find in the manual that the maximum size...
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 (each blob is a zip file, maybe 500K to 1MB), and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.