gpt4 book ai didi

sql - 我如何加速此 SQL 查询?

转载 作者:行者123 更新时间:2023-12-02 07:37:32 25 4
gpt4 key购买 nike

<分区>

这里的情况,我正在尝试从我的 Oracle 数据库生成一个包含很多行的报告,我现在有大约 5 分钟的查询时间,想看看是否有任何方法可以改变可能加快查询时间的查询,

SELECT ib1.id as InvoiceNumber,
ib1.shipmentno as ShipmentNumber,
ib1.ref as ConsignorRef,
cons1.name as ConsName,
ib1.consolidation_type as ShipmentType,
to_char(ib1.custom_field12, 'YYYYMMDDhhmmss') as InvoiceDate,
ib1.reg_time as HousingDate,
ib1.list_add_time as Pickup,
ib1.confirm_date as Date,
ex1.stat_date as Timestamp,
ib1.date_prefered as ETA,
ib1.field7 as Housing,
ib1.countrycode as Country
FROM Invoice ib1,
ek_export ex1,
ek_cons cons1
WHERE ib1.ex_id=124
AND ib1.id=ex1.ib_id
AND ex1.state_type='DELIVERED'
AND ib1.cons_id=cons1.id
AND ex1.ex_id=124
AND trunc(ib1.reg_time) BETWEEN to_date('2009-01-01', 'YYYY-MM-DD') AND to_date('2010-01-01', 'YYYY-MM-DD')
ORDER BY ib1.id

有什么建议吗?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com