-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.sql
74 lines (51 loc) · 1.57 KB
/
index.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
-----------------------------------------
-----------------------------------------
-- Indexes for all MIMIC-IV-ED modules --
-----------------------------------------
-----------------------------------------
SET search_path TO mimic_ed;
DROP INDEX IF EXISTS edstays_idx01;
CREATE INDEX edstays_idx01
ON edstays (subject_id);
DROP INDEX IF EXISTS edstays_idx02;
CREATE INDEX edstays_idx02
ON edstays (hadm_id);
DROP INDEX IF EXISTS edstays_idx03;
CREATE INDEX edstays_idx03
ON edstays (stay_id);
DROP INDEX IF EXISTS medrecon_idx01;
CREATE INDEX medrecon_idx01
ON medrecon (subject_id);
DROP INDEX IF EXISTS medrecon_idx02;
CREATE INDEX medrecon_idx02
ON medrecon (stay_id);
DROP INDEX IF EXISTS pyxis_idx01;
CREATE INDEX pyxis_idx01
ON pyxis (subject_id);
DROP INDEX IF EXISTS pyxis_idx02;
CREATE INDEX pyxis_idx02
ON pyxis (stay_id);
DROP INDEX IF EXISTS pyxis_idx03;
CREATE INDEX pyxis_idx03
ON pyxis (name);
DROP INDEX IF EXISTS triage_idx01;
CREATE INDEX triage_idx01
ON triage (subject_id);
DROP INDEX IF EXISTS triage_idx02;
CREATE INDEX triage_idx02
ON triage (stay_id);
DROP INDEX IF EXISTS vitalsign_idx01;
CREATE INDEX vitalsign_idx01
ON vitalsign (subject_id);
DROP INDEX IF EXISTS vitalsign_idx02;
CREATE INDEX vitalsign_idx02
ON vitalsign (stay_id);
DROP INDEX IF EXISTS diagnoses_idx01;
CREATE INDEX diagnoses_idx01
ON diagnoses (subject_id);
DROP INDEX IF EXISTS diagnoses_idx02;
CREATE INDEX diagnoses_idx02
ON diagnoses (stay_id);
DROP INDEX IF EXISTS diagnoses_idx03;
CREATE INDEX diagnoses_idx03
ON diagnoses (icd_code);