Query | Affected | Num. rows | Took (ms) | Actions |
---|
SELECT `Aefi`.`id` FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' | 430 | 430 | 3 | |
SELECT `County`.`id`, `County`.`county_name` FROM `pvers`.`counties` AS `County` WHERE 1 = 1 ORDER BY `County`.`county_name` ASC | 47 | 47 | 1 | |
SELECT `County`.`county_name`, COUNT(*) as cnt, `County`.`id` FROM `pvers`.`aefis` AS `Aefi` LEFT JOIN `pvers`.`counties` AS `County` ON (`Aefi`.`county_id` = `County`.`id`) WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY `County`.`county_name`, `County`.`id` HAVING COUNT(*) > 0 | 33 | 33 | 9 | maybe slow |
SELECT `Aefi`.`gender`, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY gender HAVING COUNT(*) > 0 | 3 | 3 | 3 | |
SELECT ((case
when trim(age_months) in ('neonate', 'infant', 'child', 'adolescent', 'adult', 'elderly') then age_months
when age_months > 0 and age_months < 1 then 'neonate'
when age_months < 13 then 'infant'
when age_months > 13 then 'child'
when year(now()) - right(date_of_birth, 4) between 0 and 1 then 'infant'
when year(now()) - right(date_of_birth, 4) between 1 and 10 then 'child'
when year(now()) - right(date_of_birth, 4) between 18 and 65 then 'adult'
when year(now()) - right(date_of_birth, 4) between 10 and 18 then 'adolescent'
when year(now()) - right(date_of_birth, 4) between 65 and 155 then 'elderly'
else 'unknown'
end)) as ager, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY ((case
when trim(age_months) in ('neonate', 'infant', 'child', 'adolescent', 'adult', 'elderly') then age_months
when age_months > 0 and age_months < 1 then 'neonate'
when age_months < 13 then 'infant'
when age_months > 13 then 'child'
when year(now()) - right(date_of_birth, 4) between 0 and 1 then 'infant'
when year(now()) - right(date_of_birth, 4) between 1 and 10 then 'child'
when year(now()) - right(date_of_birth, 4) between 18 and 65 then 'adult'
when year(now()) - right(date_of_birth, 4) between 10 and 18 then 'adolescent'
when year(now()) - right(date_of_birth, 4) between 65 and 155 then 'elderly'
else 'unknown'
end)) HAVING COUNT(*) > 0 | 5 | 5 | 8 | maybe slow |
SELECT year(ifnull(created, created)) as year, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY year(ifnull(created, created)) HAVING COUNT(*) > 0 ORDER BY `year` ASC | 4 | 4 | 4 | |
SELECT `Designation`.`name`, COUNT(*) as cnt, `Designation`.`id` FROM `pvers`.`aefis` AS `Aefi` LEFT JOIN `pvers`.`designations` AS `Designation` ON (`Aefi`.`designation_id` = `Designation`.`id`) WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY `Designation`.`name`, `Designation`.`id` HAVING COUNT(*) > 0 | 16 | 16 | 5 | maybe slow |
SELECT IF(Aefi.serious IS NULL or Aefi.serious = "", "No", Aefi.serious) as serious, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY IF(`Aefi`.`serious` IS NULL or `Aefi`.`serious` = "", "No", `Aefi`.`serious`) HAVING COUNT(*) > 0 | 2 | 2 | 2 | |
SELECT `Aefi`.`outcome`, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY outcome HAVING COUNT(*) > 0 | 6 | 6 | 2 | maybe slow |
SELECT `Aefi`.`name_of_institution`, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY name_of_institution HAVING COUNT(*) > 0 ORDER BY COUNT(*) DESC | 167 | 167 | 2 | |
SELECT DATE_FORMAT(reporter_date, "%b %Y") as month, month(ifnull(reporter_date, reporter_date)) as salit, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`submitted` IN (1, 2) AND `Aefi`.`copied` != 1 AND `Aefi`.`deleted` = '0' AND `Aefi`.`archived` = '' GROUP BY DATE_FORMAT(reporter_date, "%b %Y"), salit HAVING COUNT(*) > 0 ORDER BY `salit` ASC | 46 | 46 | 4 | maybe slow |
SELECT `Aefi`.`serious_yes`, COUNT(*) as cnt FROM `pvers`.`aefis` AS `Aefi` WHERE `Aefi`.`id` IN (5, 7, 8, 12, 13, 14, 16, 17, 19, 24, 27, 32, 37, 38, 40, 44, 47, 48, 49, 50, 53, 61, 71, 74, 123, 130, 132, 133, 140, 141, 156, 158, 164, 178, 179, 182, 189, 191, 193, 194, 195, 196, 197, 198, 202, 203, 207, 210, 213, 215, 219, 221, 223, 225, 235, 236, 277, 298, 302, 303, 304, 305, 306, 307, 308, 309, 311, 313, 316, 318, 319, 320, 321, 322, 324, 325, 326, 327, 328, 332, 339, 342, 343, 348, 368, 372, 373, 388, 391, 392, 395, 449, 450, 451, 452, 453, 454, 455, 469, 472, 479, 481, 482, 486, 497, 520, 521, 525, 526, 527, 529, 530, 531, 543, 544, 545, 546, 549, 550, 553, 556, 557, 558, 559, 564, 566, 567, 569, 570, 573, 576, 578, 580, 581, 584, 605, 606, 607, 608, 609, 610, 611, 613, 614, 615, 616, 617, 618, 622, 629, 647, 648, 665, 666, 837, 838, 849, 856, 886, 899, 903, 907, 916, 919, 923, 937, 940, 943, 947, 948, 990, 992, 996, 1006, 1021, 1022, 1024, 1027, 1031, 1037, 1038, 1039, 1041, 1042, 1044, 1045, 1047, 1048, 1049, 1052, 1058, 1059, 1060, 1063, 1066, 1069, 1078, 1097, 1129, 1130, 1131, 1132, 1134, 1139, 1140, 1141, 1147, 1151, 1161, 1170, 1179, 1186, 1200, 1205, 1206, 1207, 1214, 1215, 1218, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1231, 1232, 1237, 1240, 1243, 1247, 1248, 1250, 1252, 1255, 1265, 1268, 1278, 1281, 1300, 1301, 1303, 1304, 1311, 1313, 1314, 1317, 1321, 1323, 1324, 1327, 1328, 1330, 1331, 1334, 1335, 1336, 1338, 1339, 1340, 1341, 1342, 1343, 1345, 1346, 1347, 1349, 1350, 1351, 1352, 1353, 1355, 1357, 1359, 1360, 1361, 1362, 1363, 1364, 1372, 1384, 1389, 1391, 1392, 1393, 1398, 1399, 1401, 1402, 1403, 1405, 1406, 1407, 1408, 1409, 1414, 1415, 1416, 1417, 1418, 1428, 1431, 1432, 1433, 1434, 1443, 1446, 1452, 1462, 1466, 1467, 1468, 1479, 1484, 1488, 1501, 1518, 1520, 1537, 1549, 1590, 1591, 1605, 1616, 1618, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1641, 1643, 1655, 1666, 1676, 1696, 1702, 1738, 1740, 1751, 1753, 1754, 1756, 1860, 1867, 1868, 1872, 1874, 1875, 1878, 1879, 1882, 1883, 1884, 1895, 1904, 1927, 1946, 1947, 1952, 1953, 1956, 1971, 1974, 1975, 1976, 1978, 1979, 1984, 1988, 1990, 1991, 1992, 1994, 2005, 2006, 2007, 2008, 2009, 2014, 2040, 2053, 2086, 2087, 2088, 2089, 2090, 2092, 2093, 2095, 2097, 2098, 2101, 2120, 2123, 2124, 2125, 2143, 2147, 2148, 2155, 2157, 2162, 2164, 2166, 2168, 2173, 2174, 2175, 2178, 2179, 2205, 2208, 2209, 2211, 2212, 2217, 2221) AND `Aefi`.`serious` = 'Yes' GROUP BY serious_yes HAVING COUNT(*) > 0 | 6 | 6 | 21 | maybe slow |
SELECT `Vaccine`.`id`, `Vaccine`.`vaccine_name` FROM `pvers`.`vaccines` AS `Vaccine` WHERE `Vaccine`.`deleted` = '0' | 25 | 25 | 1 | |
SELECT `Vaccine`.`vaccine_name` AS `vaccine_name`, COUNT(distinct AefiListOfVaccine.aefi_id) as cnt, `Vaccine`.`id` FROM `pvers`.`aefi_list_of_vaccines` AS `AefiListOfVaccine` LEFT JOIN `pvers`.`vaccines` AS `Vaccine` ON (`AefiListOfVaccine`.`vaccine_id` = `Vaccine`.`id`) WHERE `AefiListOfVaccine`.`aefi_id` IN (5, 7, 8, 12, 13, 14, 16, 17, 19, 24, 27, 32, 37, 38, 40, 44, 47, 48, 49, 50, 53, 61, 71, 74, 123, 130, 132, 133, 140, 141, 156, 158, 164, 178, 179, 182, 189, 191, 193, 194, 195, 196, 197, 198, 202, 203, 207, 210, 213, 215, 219, 221, 223, 225, 235, 236, 277, 298, 302, 303, 304, 305, 306, 307, 308, 309, 311, 313, 316, 318, 319, 320, 321, 322, 324, 325, 326, 327, 328, 332, 339, 342, 343, 348, 368, 372, 373, 388, 391, 392, 395, 449, 450, 451, 452, 453, 454, 455, 469, 472, 479, 481, 482, 486, 497, 520, 521, 525, 526, 527, 529, 530, 531, 543, 544, 545, 546, 549, 550, 553, 556, 557, 558, 559, 564, 566, 567, 569, 570, 573, 576, 578, 580, 581, 584, 605, 606, 607, 608, 609, 610, 611, 613, 614, 615, 616, 617, 618, 622, 629, 647, 648, 665, 666, 837, 838, 849, 856, 886, 899, 903, 907, 916, 919, 923, 937, 940, 943, 947, 948, 990, 992, 996, 1006, 1021, 1022, 1024, 1027, 1031, 1037, 1038, 1039, 1041, 1042, 1044, 1045, 1047, 1048, 1049, 1052, 1058, 1059, 1060, 1063, 1066, 1069, 1078, 1097, 1129, 1130, 1131, 1132, 1134, 1139, 1140, 1141, 1147, 1151, 1161, 1170, 1179, 1186, 1200, 1205, 1206, 1207, 1214, 1215, 1218, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1231, 1232, 1237, 1240, 1243, 1247, 1248, 1250, 1252, 1255, 1265, 1268, 1278, 1281, 1300, 1301, 1303, 1304, 1311, 1313, 1314, 1317, 1321, 1323, 1324, 1327, 1328, 1330, 1331, 1334, 1335, 1336, 1338, 1339, 1340, 1341, 1342, 1343, 1345, 1346, 1347, 1349, 1350, 1351, 1352, 1353, 1355, 1357, 1359, 1360, 1361, 1362, 1363, 1364, 1372, 1384, 1389, 1391, 1392, 1393, 1398, 1399, 1401, 1402, 1403, 1405, 1406, 1407, 1408, 1409, 1414, 1415, 1416, 1417, 1418, 1428, 1431, 1432, 1433, 1434, 1443, 1446, 1452, 1462, 1466, 1467, 1468, 1479, 1484, 1488, 1501, 1518, 1520, 1537, 1549, 1590, 1591, 1605, 1616, 1618, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1641, 1643, 1655, 1666, 1676, 1696, 1702, 1738, 1740, 1751, 1753, 1754, 1756, 1860, 1867, 1868, 1872, 1874, 1875, 1878, 1879, 1882, 1883, 1884, 1895, 1904, 1927, 1946, 1947, 1952, 1953, 1956, 1971, 1974, 1975, 1976, 1978, 1979, 1984, 1988, 1990, 1991, 1992, 1994, 2005, 2006, 2007, 2008, 2009, 2014, 2040, 2053, 2086, 2087, 2088, 2089, 2090, 2092, 2093, 2095, 2097, 2098, 2101, 2120, 2123, 2124, 2125, 2143, 2147, 2148, 2155, 2157, 2162, 2164, 2166, 2168, 2173, 2174, 2175, 2178, 2179, 2205, 2208, 2209, 2211, 2212, 2217, 2221) GROUP BY `Vaccine`.`vaccine_name`, `Vaccine`.`id` HAVING COUNT(distinct `AefiListOfVaccine`.`aefi_id`) > 0 | 20 | 20 | 12 | maybe slow |
SELECT `AefiListOfVaccine`.`vaccine_name` AS `vaccine_name`, COUNT(distinct AefiListOfVaccine.aefi_id) as cnt FROM `pvers`.`aefi_list_of_vaccines` AS `AefiListOfVaccine` LEFT JOIN `pvers`.`aefis` AS `Aefi` ON (`AefiListOfVaccine`.`aefi_id` = `Aefi`.`id`) LEFT JOIN `pvers`.`vaccines` AS `Vaccine` ON (`AefiListOfVaccine`.`vaccine_id` = `Vaccine`.`id`) WHERE `AefiListOfVaccine`.`aefi_id` IN (5, 7, 8, 12, 13, 14, 16, 17, 19, 24, 27, 32, 37, 38, 40, 44, 47, 48, 49, 50, 53, 61, 71, 74, 123, 130, 132, 133, 140, 141, 156, 158, 164, 178, 179, 182, 189, 191, 193, 194, 195, 196, 197, 198, 202, 203, 207, 210, 213, 215, 219, 221, 223, 225, 235, 236, 277, 298, 302, 303, 304, 305, 306, 307, 308, 309, 311, 313, 316, 318, 319, 320, 321, 322, 324, 325, 326, 327, 328, 332, 339, 342, 343, 348, 368, 372, 373, 388, 391, 392, 395, 449, 450, 451, 452, 453, 454, 455, 469, 472, 479, 481, 482, 486, 497, 520, 521, 525, 526, 527, 529, 530, 531, 543, 544, 545, 546, 549, 550, 553, 556, 557, 558, 559, 564, 566, 567, 569, 570, 573, 576, 578, 580, 581, 584, 605, 606, 607, 608, 609, 610, 611, 613, 614, 615, 616, 617, 618, 622, 629, 647, 648, 665, 666, 837, 838, 849, 856, 886, 899, 903, 907, 916, 919, 923, 937, 940, 943, 947, 948, 990, 992, 996, 1006, 1021, 1022, 1024, 1027, 1031, 1037, 1038, 1039, 1041, 1042, 1044, 1045, 1047, 1048, 1049, 1052, 1058, 1059, 1060, 1063, 1066, 1069, 1078, 1097, 1129, 1130, 1131, 1132, 1134, 1139, 1140, 1141, 1147, 1151, 1161, 1170, 1179, 1186, 1200, 1205, 1206, 1207, 1214, 1215, 1218, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1231, 1232, 1237, 1240, 1243, 1247, 1248, 1250, 1252, 1255, 1265, 1268, 1278, 1281, 1300, 1301, 1303, 1304, 1311, 1313, 1314, 1317, 1321, 1323, 1324, 1327, 1328, 1330, 1331, 1334, 1335, 1336, 1338, 1339, 1340, 1341, 1342, 1343, 1345, 1346, 1347, 1349, 1350, 1351, 1352, 1353, 1355, 1357, 1359, 1360, 1361, 1362, 1363, 1364, 1372, 1384, 1389, 1391, 1392, 1393, 1398, 1399, 1401, 1402, 1403, 1405, 1406, 1407, 1408, 1409, 1414, 1415, 1416, 1417, 1418, 1428, 1431, 1432, 1433, 1434, 1443, 1446, 1452, 1462, 1466, 1467, 1468, 1479, 1484, 1488, 1501, 1518, 1520, 1537, 1549, 1590, 1591, 1605, 1616, 1618, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1641, 1643, 1655, 1666, 1676, 1696, 1702, 1738, 1740, 1751, 1753, 1754, 1756, 1860, 1867, 1868, 1872, 1874, 1875, 1878, 1879, 1882, 1883, 1884, 1895, 1904, 1927, 1946, 1947, 1952, 1953, 1956, 1971, 1974, 1975, 1976, 1978, 1979, 1984, 1988, 1990, 1991, 1992, 1994, 2005, 2006, 2007, 2008, 2009, 2014, 2040, 2053, 2086, 2087, 2088, 2089, 2090, 2092, 2093, 2095, 2097, 2098, 2101, 2120, 2123, 2124, 2125, 2143, 2147, 2148, 2155, 2157, 2162, 2164, 2166, 2168, 2173, 2174, 2175, 2178, 2179, 2205, 2208, 2209, 2211, 2212, 2217, 2221) AND `AefiListOfVaccine`.`vaccine_name` IS NOT NULL AND `AefiListOfVaccine`.`vaccine_id` IS NULL GROUP BY `AefiListOfVaccine`.`vaccine_name` HAVING COUNT(distinct `AefiListOfVaccine`.`aefi_id`) > 0 | 14 | 14 | 4 | maybe slow |