插入的准备时间慢 [英] Slow prepare times for inserts

查看:64
本文介绍了插入的准备时间慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的问题是插件的耗时比我预期的要多得多。到目前为止它似乎只是第一个插入。 (尽管如此,我还有其他人告诉我它的发生不仅仅是第一次

时间)单次插入的时间是2-10秒。我不能想象需要那么长时间的
。我们使用JDBC,这个

时间的大部分时间都在准备上。有没有人对

有什么想法可能导致这个?

I am having an issue where inserts are taking a lot longer than I would
expect. So far it seem that it is just the first insert. (Although, I
have other people telling me it is happening more than just the firs
time) The times for a single insert are anywhere from 2-10 seconds. I
can''t imagine what takes that long. We use JDBC and the bulk of this
time is on the prepare of the statment. Does anyone have any ideas on
what could be causing this?

推荐答案

TC写道:
TC wrote:

我遇到的问题是插入花费的时间比我预期的要多得多。到目前为止它似乎只是第一个插入。 (尽管如此,我还有其他人告诉我它的发生不仅仅是第一次

时间)单次插入的时间是2-10秒。我不能想象需要那么长时间的
。我们使用JDBC,这个

时间的大部分时间都在准备上。有没有人对

有任何想法可能导致这种情况?
I am having an issue where inserts are taking a lot longer than I would
expect. So far it seem that it is just the first insert. (Although, I
have other people telling me it is happening more than just the firs
time) The times for a single insert are anywhere from 2-10 seconds. I
can''t imagine what takes that long. We use JDBC and the bulk of this
time is on the prepare of the statment. Does anyone have any ideas on
what could be causing this?



目标表是否有触发器或RI约束?

如果有一些触发器,其中一些是在INSTEAD OF触发器之后,

依次修改带有触发器等的表等。

快速浏览一下计划将显示INSERT是否简单(只是一个

几个操作员在视觉上解释)或讨厌(解释中的东西)。


干杯

Serge

-

Serge Rielau

DB2解决方案开发

IBM多伦多实验室


IOD会议
http://www.ibm.com/software/data/ond...ness/conf2006/


Serge Rielau写道:
Serge Rielau wrote:

目标表是否有触发器或RI约束?

如果有触发器是其中一些是在INSTEAD OF触发器之后,其中
依次修改带有触发器等的表等。

快速查看该计划将显示INSERT是否简单(只是一个

几个操作员在视觉上解释)或讨厌(解释中的东西的页面)。
Does the target table have triggers or RI constraints?
If there are triggers are some of them AFTER o INSTEAD OF triggers which
in turn modify tables with triggers, etc, etc.
A quick look at the plan will show whether the INSERT in simple (just a
few operators in visual explain) or nasty (pages of stuff in explain).



感谢您的回复。我们没有触发器或RI约束。

我刚刚注意到一篇文章说你可以对

插入做一个解释计划。我跑了一个,它很大。我们确实从Oracle迁移,因此我们使用IBM提供的一组UDF(称为MTK)

(Migration Toolkit)这些函数模拟了

存在于Oracle中。这些功能是否可能导致这个问题?b $ b问题?我将试着尝试将这些拿出来并运行另一个计划

。如果这是原因,我不知道我要做什么

。我们非常依赖这些功能。

Thanks for your response. We do not have triggers or RI contstraints.
I had just noticed an article that said you could do an explain plan on
inserts. I ran one and it was huge. We did migrate from Oracle so we
have made use of a set of UDFs provided by IBM called the MTK
(Migration Toolkit) These functions emulate equivilent functions that
exist in Oracle. Is it possible that these functions are causing this
issue? I will try to experiment with taking these out and running
another plan. If this is the cause, I am not sure what I am going to
do about it. We rely on these functions pretty heavily.


Serge Rielau写道:
Serge Rielau wrote:

目标是否表有触发器或RI约束吗?

如果有触发器,其中一些触发器是在INSTEAD OF触发器之后,

依次修改带有触发器的表等等。快速查看该计划将显示INSERT是否简单(只是一个

视觉解释中的几个运算符)或讨厌(解释中的东西页面)。
Does the target table have triggers or RI constraints?
If there are triggers are some of them AFTER o INSTEAD OF triggers which
in turn modify tables with triggers, etc, etc.
A quick look at the plan will show whether the INSERT in simple (just a
few operators in visual explain) or nasty (pages of stuff in explain).



感谢您的回复。我们没有触发器或RI约束。

我刚刚注意到一篇文章说你可以对

插入做一个解释计划。我跑了一个,它很大。我们确实从Oracle迁移,因此我们使用IBM提供的一组UDF(称为MTK)

(Migration Toolkit)这些函数模拟了

存在于Oracle中。这些功能是否可能导致这个问题?b $ b问题?我将试着尝试将这些拿出来并运行另一个计划

。如果这是原因,我不知道我要做什么

。我们非常依赖这些功能。

Thanks for your response. We do not have triggers or RI contstraints.
I had just noticed an article that said you could do an explain plan on
inserts. I ran one and it was huge. We did migrate from Oracle so we
have made use of a set of UDFs provided by IBM called the MTK
(Migration Toolkit) These functions emulate equivilent functions that
exist in Oracle. Is it possible that these functions are causing this
issue? I will try to experiment with taking these out and running
another plan. If this is the cause, I am not sure what I am going to
do about it. We rely on these functions pretty heavily.


这篇关于插入的准备时间慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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