简体   繁体   English

Cognos中的条件格式和性能

[英]Conditional formatting in Cognos and performance

I have added conditional formatting to a Cognos report, and it seems to have slowed down 我在Cognos报告中添加了条件格式,但似乎已经放慢了速度

The report was running okay before I added the formatting, and I have not changed anything else on the report, other than the conditional formatting. 在添加格式之前,报告运行正常,除了条件格式之外,我没有更改报表上的任何其他内容。

Does conditional formatting, as a general rule, cause Cognos to run slower? 作为一般规则,条件格式是否会导致Cognos运行得更慢?

As a general concept, conditional formatting will not slow down a report. 作为一般概念,条件格式化不会减慢报告速度。

That said, I can envision one scenario where the addition of conditional formatting could have an impact: You base your conditional formatting on a query item that wasn't previously included in the main data container (list, crosstab etc.). 也就是说,我可以设想一种情况,其中条件格式的添加可能会产生影响:您将条件格式基于先前未包含在主数据容器中的查询项(列表,交叉表等)。

Cognos' SQL generation is opportunistic. Cognos的SQL生成是机会主义的。 If your report only references one query, all other queries will be left out of the SQL statement sent to the data source. 如果报表仅引用一个查询,则所有其他查询将被排除在发送到数据源的SQL语句之外。 If you include a data item that comes from another query (assuming there is an established join between the two), Cognos will now include the second query in the SQL statement, constructing a join with the original query in accordance on how you define the relationship. 如果包含来自另一个查询的数据项(假设两者之间已建立连接),Cognos现在将在SQL语句中包含第二个查询,根据您如何定义关系构建与原始查询的连接。 Joining tables inevitably results in some slowdown. 加入表格不可避免地导致一些放缓。

If your original report took 10 seconds to generate and then added conditional formatting that forced a join, it's inevitable that the result will take longer. 如果您的原始报告需要10秒钟生成然后添加强制连接的条件格式,则结果将不可避免地需要更长时间。 It could be an imperceptible amount of time or a considerable slowdown depending on the query joined and the nature of the join. 根据所加入的查询和连接的性质,它可能是不可察觉的时间量或相当大的减速。

Barring the scenario I described, I would generate the tabular data for the query and see how long it takes back. 除了我描述的场景,我将生成查询的表格数据,并查看它需要多长时间。 When you generate the tablular data, conditional formatting is ignored. 生成表格数据时,将忽略条件格式。 If tabular data is slow then you know it's not the conditional formatting causing the problem. 如果表格数据很慢,那么您知道这不是导致问题的条件格式。

If you want to really track Cognos performance, check out the article on my blog regarding automatic report timing: Automated Cognos Report Performance Measurement 如果您想真正跟踪Cognos性能,请查看我博客上有关自动报告计时的文章: 自动化Cognos报告性能测量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM