Pls why did the import icustay_times fail?
Prerequisites
- [ ] Put an X between the brackets on this line if you have done all of the following:
- Checked the online documentation: https://mimic.mit.edu/
- Checked that your issue isn't already addressed: https://github.com/MIT-LCP/mimic-code/issues?utf8=%E2%9C%93&q=
Description
Description of the issue, including:
- what you have tried
- references to similar issues
- queries demonstrating your question (if applicable)
I'm doing icustay_times.sql in a postgres database
\i icustay_times.sql 我在导入icustay_times.sql时出现一个报错 [SQL] Query icustay_times start [ERR] 错误: 由于语句执行超时,正在取消查询命令
-- THIS SCRIPT IS AUTOMATICALLY GENERATED. DO NOT EDIT IT DIRECTLY. DROP TABLE IF EXISTS icustay_times; CREATE TABLE icustay_times AS -- create a table which has fuzzy boundaries on hospital admission -- involves first creating a lag/lead version of disch/admit time -- get first/last heart rate measurement during hospitalization for each stay_id WITH t1 AS ( SELECT ce.stay_id , MIN(charttime) AS intime_hr , MAX(charttime) AS outtime_hr FROM mimiciv_icu.chartevents ce -- only look at heart rate WHERE ce.itemid = 220045 GROUP BY ce.stay_id )
-- add in subject_id/hadm_id SELECT ie.subject_id, ie.hadm_id, ie.stay_id , t1.intime_hr , t1.outtime_hr FROM mimiciv_icu.icustays ie LEFT JOIN t1 ON ie.stay_id = t1.stay_id;
经过分析是group by导致查询过慢,请问该如何优化或者怎么样做才能导入成功 After analysis, the execution is too slow due to group by, how to optimize or how to import successfully?