GemsTracker / gemstracker-library

GEneric Medical Survey Tracker, main library
http://gemstracker.org
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Add index to gemsdata_responses #701

Closed mennodekker closed 2 years ago

mennodekker commented 2 years ago

For performance reasons (in our datawarehouse) I need an index in gemsdata_responses. Would it be possible to add it to the 1.9.1 branch / patch level so we can easily roll it out in Erasmus?

The statement would be the one below and it would fail if the index already exists. If I leave out the name of the index it will create a duplicate.

ALTER TABLE gemsdata__responses ADD INDEX gdr_changed (gdr_changed);
jvangestel commented 2 years ago

Also added in r1.9.1 5e73a47

mennodekker commented 2 years ago

@jvangestel I think it should be added to the file /configs/db_response_data/patches.sql since it could be in a different database. (thanks for the quick response!)