explain analyze
select
distinct
tah.id ,
tah.hcbt ,
tah.hclx ,
(
select
dict."name"
from
pro_admin.t_dict dict
where
dict.code = tah.hclx
and dict.type_code = 'HCLX') hclxName,
tah.hcnr ,
tah.ajbh ,
tah.fbdw ,
(
select
td.short_name
from
pro_admin.t_department td
where
td.code = tah.fbdw ) fbdwName,
tah.fbsj ,
tah.gkcd ,
(
select
dict."name"
from
pro_admin.t_dict dict
where
dict.code = tah.gkcd
and dict.type_code = 'GKCD') gkcdName,
taf.qszt ,
(
select
dict."name"
from
pro_admin.t_dict dict
where
dict.code = taf.qszt
and dict.type_code = 'QSZT') qsztName,
taf.ly ,
taf.sfzf ,
(
select
dict."name"
from
pro_admin.t_dict dict
where
dict.code = taf.ly
and dict.type_code = 'SFZF') sfzfName,
coalesce(( select dict."name" from pro_admin.t_dict dict where dict.code = taf.ly and dict.type_code = 'AJXT-LY'), '无') lyName,
(select name from pro_admin.t_dict where enable and type_code = 'ZLJB' and code = tah.level::text) level_label,
tah.level,
(select description from pro_admin.t_dict where enable and type_code = 'ZLJB' and code = tah.level::text) level_desc,
tah.to_sign_time,
tah.to_fk_time,
tah.hcbh
from
combined_
postgresql一次线上通过执行计划解决sql查询慢问题分享
最新推荐文章于 2023-12-28 09:35:44 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)