DB2何时获得MVCC? [英] When will DB2 get MVCC?

查看:209
本文介绍了DB2何时获得MVCC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


在一个相当大的数据库中,我遇到了这个问题:

通过相当长时间运行的DELETE定期更新几个表
+ INSERT。使用未提交的读取作为隔离级别似乎是不安全的,因为我会像一致的数据一样(这是使用DBMS的主要要点之一

第一个在我的意见中。


到目前为止,几乎所有其他重要数据库都已获得MultiVersion

并发控制(MVCC)[1],默认情况下,或者可选择

(就像在MSSQL2005中一样:DBA需要明确地激活它[2])。


MVCC的非常好的和明显的优势是读者不要阻止

作者,反之亦然:如果我只是用桌子工作,我只需要使用最新提交的数据来处理
我的

查询开始时的表格。具有写入活动的并发运行事务

将继续工作,但是除非

在写入事务完成后启动新查询,否则读者不会看到它的操作。

显而易见的缺点 - 更多临时数据让DBMS保持

跟踪 - 这是我很乐意支付的价格。


我已经阅读了很多关于如何缓解DB2锁定问题的文章,

但是它们或者似乎建议的行为并没有真正改善

情况显着,或者他们建议我发现不安全/丑陋的行动

(承诺更频繁;但我_want_一致!)。


什么是IBM?

注意:

1)MVCC似乎存在许多不同的同义词,例如

"行版本控制,快照隔离,...

2)由于我觉得奇怪的原因 - 将其关闭应该是

可选的se如果他们要问我


-

问候,

Troels Arvin< tr **** @ arvin .dk>
http://troels.arvin.dk/

Hello,

In a rather large database, I face this problem:
Several tables are regularly updated through rather long-running DELETE
+INSERTs. Using uncommitted read as isolation level seems unsafe, as I''d
like consistent data (that''s one of the main points of using a DBMS in
the first place, in my opinion).

Almost all other significant databases have gotten MultiVersion
Concurrency Control (MVCC)[1] by now, either by default, or optionally
(like in MSSQL2005: the DBA needs to activate it explicitly[2]).

The very nice and obvious advantage with MVCC is that readers don''t block
writers, and vice versa: If I''m working read-only with a table, I simply
work with the latest committed data for that table at the time when my
query started. A concurrently running transaction with write activity
will continue working, but the reader doesn''t see its actions unless
he starts a new query after the writing transaction has finished.
The obvious disadvantage -- more temporary data for the DBMS to keep
track of -- is a price which I''d gladly pay.

I''ve read a number of articles on how to mitigate DB2''s locking problem,
but they either seem to suggest actions which don''t really improve the
situation significantly, or they suggest actions which I find unsafe/ugly
(committing more often; but I _want_ consistency!).

What''s keeping IBM?
Notes:
1) many different synonyms seem to exist for MVCC, such as
"row versioning", "snapshot isolation", ...
2) for reasons that I find strange -- turning it off should be the
optional setting if they were to ask me

--
Regards,
Troels Arvin <tr****@arvin.dk>
http://troels.arvin.dk/

推荐答案

Troels Arvin写道:
Troels Arvin wrote:

什么是IBM?
What''s keeping IBM?



没什么。 Last Comitted在猎豹...


DB2是该地区的小费。

您是否尝试过:

db2set DB2_SKIP_INSERTED =是

有类似的删除和更新设置


干杯

Serge


PS:关于MvCC最令人困惑的事情之一就是它与并发相混淆。你的要求MvCC是什么?如果是这样的话

级别:交易,声明,长期

或者只是读者不能阻止可以用最后一次实现的作者

委托?


-

Serge Rielau

DB2解决方案开发

IBM多伦多实验室

Nothing. Last Comitted is in Cheetah...

DB2 is tip toeing in the area.
Have you tried:
db2set DB2_SKIP_INSERTED=yes
There are similar settings for delete and update

Cheers
Serge

PS: One of the things that is most confusing about MvCC is that it is
confused with concurrency. WHich is your request MvCC? If so Which
level: Transaction, statement, long term
Or simply readers not blocking writers which can be achieved with LAST
COMMITTED ?

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


2007年4月19日星期四22:44:56 -0400,Serge Rielau写道:
On Thu, 19 Apr 2007 22:44:56 -0400, Serge Rielau wrote:

>什么在保持IBM?
>What''s keeping IBM?



没什么。 Last Comitted在Cheetah ...

Nothing. Last Comitted is in Cheetah...



Cheetah似乎是Informix(?)

Cheetah seems to be Informix(?)


DB2 is在该地区提示脚趾。

您是否尝试过:

db2set DB2_SKIP_INSERTED = yes
DB2 is tip toeing in the area.
Have you tried:
db2set DB2_SKIP_INSERTED=yes

http://publib.boulder.ibm.com/infoce...2luw/v8/topic/

com.ibm.db2.udb.doc / admin / c0012389.htm听起来像是我们应该考虑的事情。不过,我对页面感到有些困惑;它不鼓励改变到DB2_SKIP_INSERTED =是
,如果

- 你使用DBMS进行进程间通信;我们

不这样做

- 你不会使用很多DELETE和随后的INSERT;我们这样做

我们的一些数据

http://publib.boulder.ibm.com/infoce...2luw/v8/topic/
com.ibm.db2.udb.doc/admin/c0012389.htm sounds like something we should
consider. I''m somewhat confused by the page, however; it discourages
changing to DB2_SKIP_INSERTED=yes, if
- you use the DBMS for inter-process communication; we
do not do this
- you don''t use many DELETEs and subsequent INSERTs; we do this
for some of our data


PS:关于MvCC最令人困惑的事情之一是它是

与并发混淆。你的要求MvCC是什么?如果是这样的话

级别:交易,声明,长期或者只是读者没有阻止

作者可以用最后的承诺来实现?
PS: One of the things that is most confusing about MvCC is that it is
confused with concurrency. WHich is your request MvCC? If so Which
level: Transaction, statement, long term Or simply readers not blocking
writers which can be achieved with LAST COMMITTED ?



我同意MVCC不仅仅是MVCC - 这个概念有很多细微差别。

然而,首先,我要'我希望读者能够阻止作者,但是我认为这是
,最后的承诺是Informix的土地(这与我们无关)。


DB2''锁定模型使我很难理解为什么有人会推荐DB2除了严格的OLTP之外的任何东西(我可以看到非

MVCC可能具有性能优势)。我参与了在OLTP和数据仓库之间的某些系统,为此,我经常运行

来解决DB2的锁定问题。每次我去寻找信息

如何减轻这种麻烦,我似乎遇到了新的注册表

变量,我可以尝试调整(或丑陋的黑客似乎

妥协一致性。)


-

问候,

Troels Arvin< tr ** **@arvin.dk>
http://troels.arvin.dk/


Troels Arvin写道:
Troels Arvin wrote:

On Thu,2007年4月19日22:44:56 -0400 ,Serge Rielau写道:
On Thu, 19 Apr 2007 22:44:56 -0400, Serge Rielau wrote:

>>什么在保持IBM?
>>What''s keeping IBM?


没什么。 Last Comitted在Cheetah ...

Nothing. Last Comitted is in Cheetah...



Cheetah似乎是Informix(?)


Cheetah seems to be Informix(?)



是的。你问什么是IBM的。 Informix是IBM。

IBM选择IDS来领导这项工作。

如果您认为这意味着未来版本的DB2可能会跟随

这肯定不是一个古怪的想法。


感谢您回答我的问题。您关心并发,而不是

快照隔离。大多数客户属于这一类。

真正的MvCC是吞吐量的消耗,因为它大大增加了I / O.


DB2_SKIP_INSERTED很快就会成为默认行为。

它是最后委托的语义。

对DELETE / INSERT组合的恐惧与

执行DELETE / INSERT而不是UPDATE的应用程序有关。我怀疑你属于那个类别。


我总是推荐DB2_SKIP_INSERTED。


你提到的这些黑客经常是尖锐的行为/>
稍后成为默认值。客户必须有机会熟悉新行为并选择退出而不是选择退出。


干杯

Serge < br $>
-

Serge Rielau

DB2解决方案开发

IBM多伦多实验室

Yes. You ask what''s keeping IBM. Informix is IBM.
IBM picked IDS to lead the charge.
If you believe that this means that a future version of DB2 may follow
that is certainly not an outlandish thought.

Thanks for answering my question. You care for concurrency, not the
snapshot isolation. Most customers fall into that category.
True MvCC is a drain on throughput because it greatly increases I/O.

DB2_SKIP_INSERTED may become the default behavior soon.
It is LAST COMMITTED semantics.
The fear for DELETE/INSERT combination is related to applications that
do DELETE/INSERT instead of UPDATE. I doubt you fall into that category.

I ALWAYS recommend DB2_SKIP_INSERTED.

These hacks you refer to oftentimes are bleeding edge behavior that
become default later. Customers must have the opportunity to acquaint
themselves with new behaviour and opt in rather than opt out.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


这篇关于DB2何时获得MVCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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