【发布时间】:2016-10-25 22:19:11
【问题描述】:
我有一个相当大的 SELECT 查询,但它通常只运行大约 1.5/2 分钟,但在添加另一块时,我必须在左外连接上使用 to_char 函数来解决“无效数字”错误.
现在,我的查询需要 10 多分钟,并且在 SSRS 中已超时。 to_char 有更好的替代品吗?我在这个子句中使用它:
left outer join ifsapp.customer_order_line col
on col.order_no = fa.order_ref_1
and col.line_no = fa.order_ref_2
and col.rel_no = fa.order_ref_3
and to_char(col.line_item_no) = fa.order_ref_4
line_item_no 字段是“数字”类型,order_ref_4 字段是“varchar2(20)”类型。
我可以使用强制转换或转换来提高效率吗?
【问题讨论】:
标签: sql oracle reporting-services oracle11g ssrs-2008