在这种情况下,我试图从我的 Oracle DB 中生成一个包含很多行的报告,我现在有大约 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
有小费吗?