473,714 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 10258
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
5017
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. When I create a new table (did not specify on which tablespace), why the table not created on the userspace1 but instead on tmpxx? what is the rule to create a table on tablespace without specify in which tablespace if I have both tablespace...
4
5872
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
408
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 where. With a table kinda like: CREATE TABLE BLOB_TABLE ( BLOB_ID INT,
1
1999
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 and is full. What options do I have to increase the table size? Please give response for SMS and DMS.
6
3330
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 BLOB. Is there something inefficent about the SQL and CASE statement below that makes this error occur?
1
5534
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 and bufferpool , the statement itself will fail ...why i'm asking is if we chose a different page size ( ofcourse less than bufferpool page size ) only it shoud affect the performance of db2 .. Thanks in Advance Raja Shekar
2
11563
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 VARCHAR(255),
2
3593
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 for 32K page size container is 512G only. Does it mean that the maximum size for 1 tablespace is also limited by 512G or I can create a tablespace with 2 containers (512G each) to support 1000G table? Thanks.
6
8074
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 this particular table is close to 300GB in size. We are not experiencing any problems, and there is plenty of space on the server, but I was just wondering if there is limit in DB2 to how big this table can get. We are guessing it is going to...
0
8802
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8711
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9314
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4726
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3158
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2111
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.