fm 中 sql类型设置为 pass through 然后报表打开就特别慢,半小时了都没打开,改为本地的话,就变得快多了,想知道这是什么原因,sql设置里面的三种类型,cognos,本地 ,pass through 都是什么意思,或者说有啥区别?
收起我一般都是使用Cognos SQL。
Type | Advantage | Disadvantage |
Cognos® SQL | Cognos SQL improves query subject performance; for example, by removing unused elements at query time. SQL works on any supported database. | You cannot enter non-standard SQL. |
Native SQL | Performance is optimized across all related query subjects. You can use SQL that is specific to your database. | You cannot use SQL that the data source does not support for subqueries. The SQL may not work on a different database type. |
Pass- Through SQL | You can enter any SQL supported by the database. | There is no opportunity for Framework Manager to automatically optimize performance. The SQL may not work on a different data source. |
上面是官方解释,以下是我个人的理解:
你建query subjects的时候 FM默认的都是Cognos SQL,并且Cognos SQL支持SQL standards,和所有的关系型数据源之间都能合作兼容,FM会根据你的数据源生成尽可能最有效的SQL
Native SQL:
Native SQL就等同于你数据源的SQL,比如你用的Oracle数据源,那就是Oracle SQL。当一个查询主题使用多个数据源的时候是不能使用Native SQL的。
pass-through SQL:
当你输入的SQL在派生表中不可用的时候可是使用pass-through SQL。它跳出了数据源本身对子查询的所有限制。