It would make more sense to have indexes on vocabulary tables be in separate file that our R script can call separately from other data tables (e.g., DRUG_EXPOSURE).
(or we could only do that for postgres)
So this part of file would be split into seperate file called OMOP CDM indexes Vocab tables.sql'
This code
CREATE INDEX idx_cohort_subject_id ON cohort (subject_id ASC);
CREATE INDEX idx_cohort_c_definition_id ON cohort (cohort_definition_id ASC);
CREATE INDEX idx_ca_subject_id ON cohort_attribute (subject_id ASC);
CREATE INDEX idx_ca_definition_id ON cohort_attribute (cohort_definition_id ASC);
CREATE INDEX idx_drug_era_person_id ON drug_era (person_id ASC);
CLUSTER drug_era USING idx_drug_era_person_id ;
CREATE INDEX idx_drug_era_concept_id ON drug_era (drug_concept_id ASC);
CREATE INDEX idx_dose_era_person_id ON dose_era (person_id ASC);
CLUSTER dose_era USING idx_dose_era_person_id ;
CREATE INDEX idx_dose_era_concept_id ON dose_era (drug_concept_id ASC);
CREATE INDEX idx_condition_era_person_id ON condition_era (person_id ASC);
CLUSTER condition_era USING idx_condition_era_person_id ;
CREATE INDEX idx_condition_era_concept_id ON condition_era (condition_concept_id ASC);
We supply indices to be helpful but do not require that they are used. Users can split them into vocabulary indices if they so choose based on how they load and use data.
We import vocabulary tables separately.
It would make more sense to have indexes on vocabulary tables be in separate file that our R script can call separately from other data tables (e.g., DRUG_EXPOSURE).
(or we could only do that for postgres)
So this part of file would be split into seperate file called OMOP CDM indexes Vocab tables.sql'
This code
CREATE INDEX idx_cohort_subject_id ON cohort (subject_id ASC); CREATE INDEX idx_cohort_c_definition_id ON cohort (cohort_definition_id ASC);
CREATE INDEX idx_ca_subject_id ON cohort_attribute (subject_id ASC); CREATE INDEX idx_ca_definition_id ON cohort_attribute (cohort_definition_id ASC);
CREATE INDEX idx_drug_era_person_id ON drug_era (person_id ASC); CLUSTER drug_era USING idx_drug_era_person_id ; CREATE INDEX idx_drug_era_concept_id ON drug_era (drug_concept_id ASC);
CREATE INDEX idx_dose_era_person_id ON dose_era (person_id ASC); CLUSTER dose_era USING idx_dose_era_person_id ; CREATE INDEX idx_dose_era_concept_id ON dose_era (drug_concept_id ASC);
CREATE INDEX idx_condition_era_person_id ON condition_era (person_id ASC); CLUSTER condition_era USING idx_condition_era_person_id ; CREATE INDEX idx_condition_era_concept_id ON condition_era (condition_concept_id ASC);
You can use emoji icon to indicate your "vote"