Powerbi Power BI对于在Toad中运行得很快的同一查询运行得非常慢

Powerbi Power BI对于在Toad中运行得很快的同一查询运行得非常慢,powerbi,powerquery,Powerbi,Powerquery,我正在尝试将我的数据导入power bi,这将为我提供以下PL/SQL数据: SELECT A.WINDOW, A.ROUTE, A.WEBORDERNUM, min(A.SCANDATE) FROM SCANNING A WHERE ( A.CARTONSTATUS IN ( 'DELIVERED','REFUSED' ) AND ( A.SCANDATE >TRUNC(SYSDATE)+1/24) ) Group by A.WIN

我正在尝试将我的数据导入power bi,这将为我提供以下PL/SQL数据:

SELECT
  A.WINDOW,
  A.ROUTE,
  A.WEBORDERNUM,
  min(A.SCANDATE)
FROM
  SCANNING A
WHERE
  (
   A.CARTONSTATUS  IN  ( 'DELIVERED','REFUSED' )
   AND
   ( A.SCANDATE  >TRUNC(SYSDATE)+1/24)
  )
 Group by
 A.WINDOW,
 A.ROUTE,
 A.WEBORDERNUM
我在power bi中导入扫描表,并执行以下步骤:

然后我在Power BI中查看我的sql语句,它如下所示:

select "rows"."WEBORDERNUM" as "WEBORDERNUM",
    "rows"."ROUTE" as "ROUTE",
    "rows"."WINDOW" as "WINDOW",
    min("rows"."SCANDATE") as "Min Scan"
from 
(
    select "_"."SCANDATE",
        "_"."WEBORDERNUM",
        "_"."ROUTE",
        "_"."WINDOW"
    from "AIRCLIC_PROD"."CARTONTRACKING" "_"
    where "_"."SCANDATE" > TO_TIMESTAMP('2018-06-26 01:00:00','YYYY-MM-DD HH24:MI:SS.FF') and ("_"."CARTONSTATUS" = 'DELIVERED' and "_"."CARTONSTATUS" is not null or "_"."CARTONSTATUS" = 'REFUSED' and "_"."CARTONSTATUS" is not null)
) "rows"
group by "WEBORDERNUM",
    "ROUTE",
    "WINDOW"
我认为它们完全相同,但我不确定在power bi中导入数据需要5分钟以上,但当我在Toad中运行查询时,只需要1秒钟


有人有主意吗?

where子句有更多的条件要检查。可能尝试删除空检查?问题应该来自scandate,它是日期时间格式,而不是日期。