查询换型及批次及vacuum历史记录
按工位换型查询,以5002-40工位,扫码步骤为例
select t_operat.et_stocpf,t_operat.datemodif,LEFT(t_operat.heuremodif,6) AS timeHms,t_stocpf.et_lotpf,et_refcmp,t_modeop.et_prod_poste,qualpf_libelle
from t_operat,t_stocpf,t_simo,t_modeop,t_nomen,t_qualpf
where t_operat.et_stocpf in(SELECT id_stocpf from t_stocpf)
and t_stocpf.id_stocpf=t_operat.et_stocpf
and t_operat.et_simo=t_simo.id_simo
and t_simo.et_modeop=t_modeop.id_modeop
and t_simo.et_nomen=t_nomen.id_nomen
and t_stocpf.et_qualpf=t_qualpf.id_qualpf
and t_modeop.et_prod_poste='5002-40'
and t_modeop.id_modeop=15855
order by datemodif,timeHms
换型批次信息在表格
t_lotpf
查找vacuum历史记录
select last_autovacuum, last_autoanalyze from
"pg_catalog"."pg_stat_all_tables"