473,791 Members | 3,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Preloading data/table in memory?


Folks,

I am using DB2 UDB 8.1 on RedHat ES 2.1. In order to improve performance
of one of our table, I would like to preload some or all of the data into
memory when I start DB2.

Is there a way to do it?
Thanks.

--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #1
10 7820
Hemant Shah wrote:
Folks,

I am using DB2 UDB 8.1 on RedHat ES 2.1. In order to improve performance
of one of our table, I would like to preload some or all of the data into
memory when I start DB2.

Is there a way to do it?
Thanks.

That should be easy enough.
Create a bufferpool big enough for the table.
Create a tablespace fo rtehat bufferpool
place the table in that tablespace.
Provoke a scan after starting up DB2.
E.g. SELECT COUNT(DISTINCT *) FROM T;

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2
"Serge Rielau" <sr*****@ca.ibm .com> wrote in message
news:36******** *****@individua l.net...
That should be easy enough.
Create a bufferpool big enough for the table.
Create a tablespace fo rtehat bufferpool
place the table in that tablespace.
Provoke a scan after starting up DB2.
E.g. SELECT COUNT(DISTINCT *) FROM T;

Cheers
Serge


Don't forget about the index(es) for the table. If the table is very
important, then all of its indexes should be in memory also (unless the
table is so small that the indexes would not be used by DB2.
Nov 12 '05 #3
The question should be -
Do you want to increase the response time of the whole system ?
or
Do you want ot speed up the response time for one peticular sql stmt?
Both questions might involve to improve performance of one special table.
BTW, db2 will not suggest you always cache one physical table or index. DB2
server's memory control manager has some algorithm to decide the age of each
data page and figure out which one supposed to be out. Most of time, it
would not help if you try to tell db2 server how to ....

"Hemant Shah" <sh**@typhoon.x net.com> wrote in message
news:cu******** **@new7.xnet.co m...

Folks,

I am using DB2 UDB 8.1 on RedHat ES 2.1. In order to improve performance
of one of our table, I would like to preload some or all of the data into
memory when I start DB2.

Is there a way to do it?
Thanks.

--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.

Nov 12 '05 #4
While stranded on information super highway Fan Ruo Xin wrote:
The question should be -
Do you want to increase the response time of the whole system ?
or
Do you want ot speed up the response time for one peticular sql stmt?
Both questions might involve to improve performance of one special table.
BTW, db2 will not suggest you always cache one physical table or index. DB2
server's memory control manager has some algorithm to decide the age of each
data page and figure out which one supposed to be out. Most of time, it
would not help if you try to tell db2 server how to ....

This is a readonly table. It contain acturial (sp?) data. There are certain
transactions that read different subset of the table over and over again to
perform calculations. If the whole table is in memory then there is no I/O
latency like getting data from the disk.

"Hemant Shah" <sh**@typhoon.x net.com> wrote in message
news:cu******** **@new7.xnet.co m...

Folks,

I am using DB2 UDB 8.1 on RedHat ES 2.1. In order to improve performance
of one of our table, I would like to preload some or all of the data into
memory when I start DB2.

Is there a way to do it?
Thanks.

--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.



--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #5
While stranded on information super highway Serge Rielau wrote:
Hemant Shah wrote:
Folks,

I am using DB2 UDB 8.1 on RedHat ES 2.1. In order to improve performance
of one of our table, I would like to preload some or all of the data into
memory when I start DB2.

Is there a way to do it?
Thanks.
That should be easy enough.
Create a bufferpool big enough for the table.
Create a tablespace fo rtehat bufferpool
place the table in that tablespace.
Provoke a scan after starting up DB2.
E.g. SELECT COUNT(DISTINCT *) FROM T;


Thanks I will try that. I already have seperate bufferpool and table space
for the table.

The table has 354677 rows and each row will not be more then 3100 bytes.

I have defined a bufferpool of 10000 pages, each page is 32k.

"create bufferpool planfilepool size 10000 pagesize 32k"

I will have to increase the size of the bufferpool.

Do I need to create buffer pool with 4K pages because each row will be less
then 4K, so will 32K pagesize work with the table?

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab


--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #6
While stranded on information super highway Mark A wrote:
"Serge Rielau" <sr*****@ca.ibm .com> wrote in message
news:36******** *****@individua l.net...
That should be easy enough.
Create a bufferpool big enough for the table.
Create a tablespace fo rtehat bufferpool
place the table in that tablespace.
Provoke a scan after starting up DB2.
E.g. SELECT COUNT(DISTINCT *) FROM T;

Cheers
Serge
Don't forget about the index(es) for the table. If the table is very
important, then all of its indexes should be in memory also (unless the
table is so small that the indexes would not be used by DB2.


How do I load index in the memory?

There is only one index on the table and it is a unique index.



--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #7
Hemant Shah wrote:
The table has 354677 rows and each row will not be more then 3100 bytes.

I have defined a bufferpool of 10000 pages, each page is 32k.

"create bufferpool planfilepool size 10000 pagesize 32k"

I will have to increase the size of the bufferpool.

Do I need to create buffer pool with 4K pages because each row will be
less then 4K, so will 32K pagesize work with the table?


The page size of the buffer pool must match with the page size of the
tablespace in which you placed the table in question.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #8
While stranded on information super highway Knut Stolze wrote:
Hemant Shah wrote:
The table has 354677 rows and each row will not be more then 3100 bytes.

I have defined a bufferpool of 10000 pages, each page is 32k.

"create bufferpool planfilepool size 10000 pagesize 32k"

I will have to increase the size of the bufferpool.

Do I need to create buffer pool with 4K pages because each row will be
less then 4K, so will 32K pagesize work with the table?
The page size of the buffer pool must match with the page size of the
tablespace in which you placed the table in question.


Yes, the pagesize of the tablespace and the bufferpool are the same.

So, I assume that the row size of the table does not matter, as long as the
pagesize of the bufferpool and the table space match.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@ xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #9
Hemant Shah wrote:
While stranded on information super highway Knut Stolze wrote:
Hemant Shah wrote:

The table has 354677 rows and each row will not be more then 3100 bytes.

I have defined a bufferpool of 10000 pages, each page is 32k.

"create bufferpool planfilepool size 10000 pagesize 32k"

I will have to increase the size of the bufferpool.

Do I need to create buffer pool with 4K pages because each row will be
less then 4K, so will 32K pagesize work with the table?


The page size of the buffer pool must match with the page size of the
tablespace in which you placed the table in question.

Yes, the pagesize of the tablespace and the bufferpool are the same.

So, I assume that the row size of the table does not matter, as long as the
pagesize of the bufferpool and the table space match.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena


I would go for 32K, less overhead.

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #10

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

Similar topics

22
3139
by: Fabian | last post by:
var preload1 = new Image(); preload1.src = "/pic/yay.gif"; var preload2 = new Image(); preload2.src = "/pic/nay.gif"; The above is meant to preload image files, yes? Problem is, it doesnt seem to be doing so in practice. Any idea where Im going wrong? Could it be that things work differnetly when in an attached .js file? -- --
6
1589
by: michaaal | last post by:
Is this the correct way to preload an image...? Var Image1 = new Image() ....And then when I'm ready to use the image I can do this...? Button1.src=Image1.src ....Or am I just telling Button1 to use the same source path as Image1?
2
1858
by: windandwaves | last post by:
Hi Gurus Preloading images has got to be JS 101. However, it does not seem to be working. Here is the function that I am using. I added the alerts to make sure it is working and all the right alerts show up, yet when I do my mouseover, it still takes about a second (only the first time) to load the image (thumbnail). Am I missing anything?
40
2848
by: Geoff Cox | last post by:
Hello, I am still having problems - apologies if the answer is in previous postings! I now have, in the header, <sctipt> var myimages=new Array();
3
1616
by: giladg22 | last post by:
Hi All, I need some help resolving a pretty tricky problem. I have a javascript application running from a CD. The script preloads between 500 to 1000 jpegs (about 40K each) to the IE. The IE immediatly decompresses the jpegs, essentially using up too much memory. I have a few limitations working against me: A) Since the jpegs reside on a CD, it is crucial that I preload them to the IE in order to not incur the seek time that is...
5
3409
by: rAinDeEr | last post by:
Hi, I have a web application with a table to store terms and conditions of a Company. This may some times run into many pages and some times it may be just a few sentences. It is a character text field. I want to know which Data type I need to use so that it doesnt waste memory. thanks in advance, rAinDeEr
6
8165
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru activesync and are able to acquire an internet connection. The sync for the program occurs thru a website...
7
2001
by: Keith Hughitt | last post by:
Hi all, I am having trouble preloading images in a javascript application, and was wondering if anyone had any suggestions. Basically I have a bunch of images stored in a database as BLOBs. At any given point in time a subset of those images is displayed on- screen. At certains times I want to swap out those on screen with new ones from the database, and do some as seamlessly as possible. So what I've tried to do is first create Image...
0
10428
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
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9997
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
7537
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
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
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.