注册

索引不生效导致查询慢

麦麦 2025/01/16 546 16

为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】: DM V8
【操作系统】:统信UOS
【问题描述】*:关联表查询两处索引都不生效。
1、SQL语句如下:
select t.id,
t.formid,
ahp.ext_title as title,
t.receive_no receiveNo,
t.serial_number serialNumber,
t.receive_unit receiveUnit,
t.security_classification securityClassification,
t.receive_time receiveTime,
t.createdDate,
t.flow_status as dealStatus,
t.createdBy,
t.createdOrg,
t.sponsor_unit sponsorUnit,
t.bln_delete,
t.file_content fileContent,
t.format_file formatFile,
ahp.ext_processstatus,
ahp.delete_reason_,
t.draft_unit_name draftUnitName,
t.flow_status,
ahp.proc_inst_id_,
t.gdzt,
t.archive_status from ACT_HI_PROCINST ahp
inner join goa_doc_receivefile t on t.id = ahp.BUSINESS_KEY_ and ahp.EXT_CATEGORY = 'goa_doc_receivefile'
order by t.createdDate desc
2、表数据量
goa_doc_receivefile表152349条记录,ACT_HI_PROCINST表265171条记录
3、索引情况,其中两张表均已更新统计信息
image.png
image.png
image.png
4、执行计划
image.png
5、执行时间
全SQL执行0.8秒,去除order by t.createdDate desc执行时间0.3秒

回答 0
暂无回答
扫一扫
联系客服