Documentum 应用程序中长时间运行的查询
在 Documentum 应用程序中检索对象时,需要很长时间。我们在数据源 och 中激活了长时间运行查询选项,但发现以下查询花费了太多时间:
select all
b.r_object_id, dm_repeating1_0.state_name, a.object_name
from
dm_policy_sp a,
dm_sysobject_sp b,
dm_policy_rp dm_repeating1_0
where
(
(a.r_object_id=b.r_policy_id)
and (dm_repeating1_0.i_state_no=b.r_current_state)
and b.r_object_id in (N'a long, long list of IDs')
or a.r_object_id in (N'a long, long list of IDs')
)
and /* ... */
如您所见,表“a”是一个策略表,它只有 7 条记录。在两个“or”运算符后面的 SQL 语句中,我们正在查找表“a”中 100 个对象之间的 object_id
!我们执行查询并在表“b”(systemObjects
) 中搜索这些对象,我们发现这些对象属于表 b!
上述查询大约需要17分钟。当我们将表中“或”运算符后面的表名改为b时,只用了10秒!
我们认为这个查询是错误的。我们不知道这是 Documentum 中的错误还是我们配置了 Documentum 错误。我们不知道在哪里可以找到创建此 SQL 的 DQL 或相关组件?有什么想法吗?
When retrieving objects in our Documentum application it takes a long time. We have activated long running query option in data source och, but have found that the below query is taking too much time:
select all
b.r_object_id, dm_repeating1_0.state_name, a.object_name
from
dm_policy_sp a,
dm_sysobject_sp b,
dm_policy_rp dm_repeating1_0
where
(
(a.r_object_id=b.r_policy_id)
and (dm_repeating1_0.i_state_no=b.r_current_state)
and b.r_object_id in (N'a long, long list of IDs')
or a.r_object_id in (N'a long, long list of IDs')
)
and /* ... */
As you can see, the table "a" is a policy table and it has only 7 records. In the SQL statement after both "or" operators, we are looking for an object_id
between 100 objects in table "a"! We executed a query and searched for those objects in table "b" (systemObjects
) and we found that those objects belong to table b!
The above query takes about 17 minutes. When we changed the name of table after "or" operator in table to b, it took only 10 seconds!
We suppose this query is wrong. We don't know if it is a bug in Documentum or we have configured Documentum wrong. We don't know where we can find the DQL which creates this SQL or related components? Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来 documentum 在 LifecycleNameDataHandler 和 LifecycleDataHandlerHelper 中执行此操作。我反编译这些类,发现这个 DQL 查询
SELECT b.r_object_id, a.state_name, a.object_name FROM dm_policy(all) a, dm_sysobject(all) b WHERE b.r_object_id IN (...) AND a.r_object_id = b。 r_policy_id AND a.i_state_no = b.r_current_state ENABLE(row_based)
Documentum Webtop 执行此命令当用户打开任何具有生命周期状态名称列的数据网格时进行 DQL 查询。
有几个选项:
Looks like documentum does it inside LifecycleNameDataHandler and LifecycleDataHandlerHelper. I decompile these classes and found this DQL query
SELECT b.r_object_id, a.state_name, a.object_name FROM dm_policy(all) a, dm_sysobject(all) b WHERE b.r_object_id IN (...) AND a.r_object_id = b.r_policy_id AND a.i_state_no = b.r_current_state ENABLE(row_based)
Documentum Webtop execute this DQL query when user open any datagrid with LifeCycle state name column.
There are a few option:
我不知道您到底想通过此查询检索什么,但我认为您的查询可能会被修改如下:
I don't know what exactly you want to retrieve by this query, but I think that your query might be reworked as follows: