I am not sure if this qualifies as a bug or not but when we recently upgraded from 4.1.0 to 4.1.0 patch 11 we noted that the form_vitals is taking much longer to execute than before the upgrade. Is there any indexing that should be applied to this form possibly on the pid field?
Once we have started an encounter we normally use the the “clinical” drop down box to select the forms that we want to use.
In the drop down box we click on form_vitals. It takes 14-17 seconds for the form to be displayed on the screen. This has the blank form on the left and all the historic vitals displayed to the right.
After entering data into the form_vitals and saving the data, if we need to reopen the form by clicking on the edit button:
The form takes 14-17 seconds before it displays on the screen. The recently entered vital sign data on the left and all the historic vital signs to the right.
Currently we have 315,550 records in the form_vitals table.
OK try creating an index for form_id on the forms table. And as Kevin suggested, indexes for encounter on forms and form_encounter. Do them one at a time so we know which one matters the most.
Since the column form_id in forms has an informal “foreign key” relationship with all of the id column form_* tables, indexing that column probably makes sense even outside the context of this issue.
Glad to hear it. You might even notice speed up for other forms. I suspect that adding an index on “encounter” would have brought your system’s “old performance” back (1-2 seconds). However the code routinely joins form_* id with forms form_id, it needs to tablescan without the index.