mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fixed issue: Questionnaire outcomes page slow with many shifts
This commit is contained in:
@@ -288,6 +288,7 @@ group by s.import_id";
|
||||
WHERE a.outcome_id = '10'
|
||||
AND a.case_id = b.case_id
|
||||
AND b.questionnaire_id = '$questionnaire_id'
|
||||
AND b.questionnaire_id = sh.questionnaire_id
|
||||
AND sh.start <= a.start
|
||||
AND sh.end >= a.start
|
||||
GROUP BY sh.shift_id) as c on (s.shift_id = c.shift_id)
|
||||
|
||||
@@ -1562,7 +1562,9 @@ CREATE TABLE `shift` (
|
||||
`start` datetime NOT NULL,
|
||||
`end` datetime NOT NULL,
|
||||
PRIMARY KEY (`shift_id`),
|
||||
KEY `questionnaire_id` (`questionnaire_id`)
|
||||
KEY `questionnaire_id` (`questionnaire_id`),
|
||||
KEY `start` (`start`),
|
||||
KEY `end` (`end`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user