缓慢的 cognos 报告

发布于 2024-09-26 00:53:54 字数 921 浏览 3 评论 0原文

我们刚刚将一份报告从 Cognos reportnet 迁移到 Cognos 8.4,但该报告现在太慢了。

该报告只有一个交叉表,嵌套在一个列表中,其中包含期间/季度/半/年的聚合

报告设计:

  • mainqueryitem (queryitem) 得到 通过手动sql获取数据。
  • 手动sql依次有4条查询 联合起来。
  • 所有 4 个查询都只是选择 来自不同表的连接(没有 组/排序/过滤器)。
  • PlanningLevel(查询项)获取 来自 mainqueryitem 的数据。 (例如:if mainqueryitem.name = 'Black' then mainqueryitem.quantity else null。 PlanningLevel的所有DataItems都使用上述格式)
  • Report Page由一个 嵌套在列表内的交叉表 (分段)。
  • 该列表与一个关联 主查询。
  • 交叉表关联到 规划层面。
  • 交叉表包含聚合 还。
  • 提示页面包含一个 多选列表。

即使对于较小的提示值,报告也非常慢。

然后,我将 PlanningLevel 查询项的属性“OverrideDimInfo”更改为“no”,该查询项在从 reportnet 迁移时已经有一些 DimensionInfo(不知道它是什么),

然后报告运行速度更快,编号更少。标准(<1 分钟)。 (快 400 倍) 但更多的是没有。选项/标准(>2),报告仍然较慢。 (对于所选的最大报告所有条件,最多 3.5 小时)

在 Toad 中运行最大报告时,mainqueryitem sql 的执行时间不超过 5 分钟。 最大的报告需要 3.5 小时,而在 Reportnet 中只需几分钟即可运行。

有什么想法可以提高性能吗?

We just migrated a report from Cognos reportnet to Cognos 8.4 and the report is too slow now.

The report just has a crosstab nested inside a list with aggregates over periods/quarters/halfs/years

Report Design:

  • The mainqueryitem (queryitem) gets
    data via manual sql.
  • The manual sql has 4 queries inturn
    unioned.
  • All the 4 queries are just selects
    from different tables joined (no
    groups/sorts/filters).
  • The PlanningLevel (queryitem) gets
    data from mainqueryitem.
    (eg: if mainqueryitem.name = 'Black' then mainqueryitem.quantity else null.
    All the DataItems of PlanningLevel uses the above format)
  • The Report Page consists of a
    crosstab nested inside a list
    (segmented).
  • The List is associated to a
    masterquery.
  • The crosstab is associated to
    planning level.
  • The crosstab contains aggregates
    also.
  • The prompt page contains a
    multiselect list.

The report was very slow even for lesser prompt values.

Then I changed the property 'OverrideDimInfo' to 'no' for PlanningLevel queryitem which had some DimensionInfos already when migrated from reportnet (don't know what it was)

The report then ran faster for lesser no. of criteria (<1 minute). (400x faster)
But for more no. of options/criteria (>2), the report is still slower. (upto 3.5 hrs, for the biggest report-all criteria selected)

The mainqueryitem sql when run in toad for the largest report takes <5 minutes to execute.
The largest report takes 3.5 hrs which was running in minutes in reportnet.

Any ideas how to improve the performance?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心凉 2024-10-03 00:53:54

我在 8.4 中观察到的一件事是,当使用嵌套在列表对象中并通过主从关系连接在一起的交叉表对象时,主查询(与列表关联)应该尽可能有限和简单。我不知道你的情况,但通常包含主查询的列表的目的是根据维度属性将交叉表结果分组,而详细查询更复杂并且还包含事实信息。在这种情况下,Cognos 不会执行两个查询来提取 Cognos 服务器上的所有数据和格式(正如人们所期望的那样),而是为每个分组触发一个单独的查询。有时,您可以通过尽可能简化主查询来提高性能。很多时候,人们只是复制详细查询,将其重命名为主查询,然后不做任何修改地连接回详细查询。删除主查询中不需要的任何内容。您的情况可能并非如此,但我们在报告中多次观察到这种行为,调整主查询通常会有所帮助。

使用列表部分时可能遇到的另一个问题(不确定这是否是分段的意思),具体取决于报表的构建方式,Cognos 有时会为每个部分触发重复的查询。您可以通过选择“工具>”来查看执行了多少查询。从菜单中显示“生成的 SQL/MDX”。

One thing I have observed in 8.4 when using a crosstab object nested within a list object, joined together with a master-detail relationship, is that your master query (associated with the list) should be as limited and simple as possible. I don't know about your situation, but usually the purpose of the list containing the master query is to segment the crosstab results into groups based on dimensional attributes, and the detail query is more complicated and includes fact information as well. In this situation, Cognos does not execute 2 queries that pull all the data and format on the Cognos server (as one would expect), but rather fires a separate query for each grouping. Sometimes you can gain some improvement in performance by simplifying the Master Query as much as possible. A lot of times people will just copy the detail query, rename it as the master and join back to detail query without any modification. Get rid of anything that you don't need in the master query. This may not be the case in your situation, but we've observed this behavior numerous times on our reports and tweaking the master query usually helps.

Another issue you can run into when using list sections (not sure if that's what you mean by segmenting) depending on how the report was built, is that Cognos will sometimes fire a duplicate query for each section. You can see how many queries are executed by selecting 'Tools > Show Generated SQL/MDX' from the menu.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文