在内存中预加载数据/表? [英] Preloading data/table in memory?

查看:81
本文介绍了在内存中预加载数据/表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



伙计,


我在RedHat ES 2.1上使用DB2 UDB 8.1。为了提高我们的一个表的性能,我想在启动DB2时将部分或全部数据预加载到

内存中。


有没有办法呢?

谢谢。


-

Hemant Shah / " \ ASCII功能区广告系列

电子邮件:没有**** ********@xnet.com \ / ---------------------

X反对HTML邮件

回复,删除NoJunkMail / \并张贴

来自我的电子邮件地址。

------- ---------- [请勿发送未经处理的大量电子邮件] ------------------

我没有''我失去了理智,以上的意见只是我的意思。

它在某处的磁带上备份。其他人可以拥有自己的。


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写道:
Hemant Shah wrote:
人们,

我我在RedHat ES 2.1上使用DB2 UDB 8.1。为了提高我们的一个表的性能,我想在启动DB2时将部分或全部数据预加载到内存中。

有没有办法做到了吗?

谢谢。
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.



这应该很容易。

为表格创建一个足够大的缓冲池。 />
创建缓冲池的表空间

将表放在该表空间中。

启动DB2后激活扫描。

例如SELECT COUNT(DISTINCT *)来自T;


干杯

Serge


-

Serge Rielau

DB2 SQL编译器开发
IBM多伦多实验室


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


" Serge Rielau" < SR ***** @ ca.ibm.com>在消息中写道

news:36 ************* @ individual.net ...
"Serge Rielau" <sr*****@ca.ibm.com> wrote in message
news:36*************@individual.net...
这应该很容易。创建一个缓冲池表空间
将表放在该表空间中。
启动DB2后激活扫描。
例如选择COUNT(DISTINCT *)来自T;

干杯
Serge
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




别忘了索引对于表。如果表非常重要,那么它的所有索引也应该在内存中(除非

表非常小,以至于DB2不会使用索引。



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.


问题应该是 -

你想增加整个系统的响应时间吗?



你想要加快一个特定的sql stmt的响应时间吗?

这两个问题都可能涉及提高一个特殊表的性能。

BTW,db2不会建议你总是缓存一个物理表或索引.DB2

服务器的内存控制管理器有一些算法来决定每个

数据的年龄页面并弄清楚哪一个应该出来。大部分时间,如果你试图告诉db2服务器如何,它将无济于事。


" Hemant Shah" sh ** @ typhoon.xnet.com>写在消息中

news:cu ********** @ new7.xnet.com。 ..
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.xnet.com> wrote in message
news:cu**********@new7.xnet.com...

伙计们,

我在RedHat ES 2.1上使用DB2 UDB 8.1。为了提高我们的一个表的性能,我想在启动DB2时将部分或全部数据预加载到内存中。

有没有办法做到了吗?

谢谢。

-
Hemant Shah /\ ASCII带状广告系列
电子邮件:没有************ @ xnet.com \ / ----- ----------------
X反对HTML邮件
回复,删除NoJunkMail / \并在我的电子邮件地址发布
它已经在某处的磁带上备份了。其他人可以有自己的。

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.



这篇关于在内存中预加载数据/表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆