glpi-project / glpi

GLPI is a Free Asset and IT Management Software package, Data center management, ITIL Service Desk, licenses tracking and software auditing.
https://glpi-project.org
GNU General Public License v3.0
4.32k stars 1.29k forks source link

ticket query stops glpi #4720

Closed Armin83 closed 6 years ago

Armin83 commented 6 years ago

the query - NOW with innodb on my test system all users only have to wait for 14 second but on production system all users wait much more without innodb Is this normal, bug or mysql / mariadb / ubuntu problem ?

N° | Queries | Time | Errors
-- | -- | -- | --
1 | SELECT `savedsearches_id` FROM `glpi_savedsearches_users` WHERE `users_id` = '2' AND `itemtype` = 'Ticket' | 0.000 |  
2 | SHOW COLUMNS FROM `glpi_tickettasks` | 0.000 |  
3 | SHOW COLUMNS FROM `glpi_tickets` | 0.001 |  
4 | SELECT * FROM `glpi_displaypreferences` WHERE `itemtype` = 'Ticket' AND ((`users_id` = '2') OR (`users_id` = '0')) ORDER BY `users_id`, `rank` | 0.000 |  
5 | SET SESSION group_concat_max_len = 16384; | 0.000 |  
6 | SELECT DISTINCT `glpi_tickets`.`id` AS id, 'glpi' AS currentuser, `glpi_tickets`.`id` AS `ITEM_0`, `glpi_tickets`.`name` AS `ITEM_1`, `glpi_tickets`.`id` AS `ITEM_1_id`, `glpi_tickets`.`id` AS `ITEM_1_id`, `glpi_tickets`.`content` AS `ITEM_1_content`, `glpi_tickets`.`status` AS `ITEM_1_status`, `glpi_entities`.`completename` AS `ITEM_2`, `glpi_tickets`.`status` AS `ITEM_3`, `glpi_tickets`.`date_mod` AS `ITEM_4`, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_items_tickets`.`items_id`, '__NULL__'), '$#$',`glpi_items_tickets`.`id`) SEPARATOR '$$##$$') AS `ITEM_5`, IFNULL(GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_items_tickets`.`itemtype`, '__NULL__'), '$#$', `glpi_items_tickets`.`id`) SEPARATOR '$$##$$'), '__NULL__$#$') AS `ITEM_5_itemtype`, `glpi_tickets`.`date` AS `ITEM_6`, GROUP_CONCAT(DISTINCT `glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`id` SEPARATOR '$$##$$') AS `ITEM_7`, GROUP_CONCAT(DISTINCT CONCAT(`glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`users_id`, ' ', `glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`alternative_email`) SEPARATOR '$$##$$') AS `ITEM_7_2`, GROUP_CONCAT(DISTINCT `glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`id` SEPARATOR '$$##$$') AS `ITEM_8`, GROUP_CONCAT(DISTINCT CONCAT(`glpi_tickets_users_819efb92c8b927b345e489211ec8e43b`.`users_id`, ' ', `glpi_tickets_users_819efb92c8b927b345e489211ec8e43b`.`alternative_email`) SEPARATOR '$$##$$') AS `ITEM_8_2`, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_groups_1358be41ea7158319a888236ffba5355`.`completename`, '__NULL__'), '$#$',`glpi_groups_1358be41ea7158319a888236ffba5355`.`id`) SEPARATOR '$$##$$') AS `ITEM_9`, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_suppliers_d5ef7ac0b56c3f7be9b7468c412fee7e`.`name`, '__NULL__'), '$#$',`glpi_suppliers_d5ef7ac0b56c3f7be9b7468c412fee7e`.`id`) SEPARATOR '$$##$$') AS `ITEM_10`, `glpi_itilcategories`.`completename` AS `ITEM_11` FROM `glpi_tickets`LEFT JOIN `glpi_entities` ON (`glpi_tickets`.`entities_id` = `glpi_entities`.`id` ) LEFT JOIN `glpi_items_tickets` ON (`glpi_tickets`.`id` = `glpi_items_tickets`.`tickets_id` ) LEFT JOIN `glpi_tickets_users` AS `glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60` ON (`glpi_tickets`.`id` = `glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`tickets_id` AND `glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`type` = 1 )LEFT JOIN `glpi_users` AS `glpi_users_a5e2026cbcb683e774f93a59e24a62a4` ON (`glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`users_id` = `glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`id` ) LEFT JOIN `glpi_tickets_users` AS `glpi_tickets_users_819efb92c8b927b345e489211ec8e43b` ON (`glpi_tickets`.`id` = `glpi_tickets_users_819efb92c8b927b345e489211ec8e43b`.`tickets_id` AND `glpi_tickets_users_819efb92c8b927b345e489211ec8e43b`.`type` = 2 )LEFT JOIN `glpi_users` AS `glpi_users_f201be21cd638ee780d08cba4ceff0d4` ON (`glpi_tickets_users_819efb92c8b927b345e489211ec8e43b`.`users_id` = `glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`id` ) LEFT JOIN `glpi_groups_tickets` AS `glpi_groups_tickets_819efb92c8b927b345e489211ec8e43b` ON (`glpi_tickets`.`id` = `glpi_groups_tickets_819efb92c8b927b345e489211ec8e43b`.`tickets_id` AND `glpi_groups_tickets_819efb92c8b927b345e489211ec8e43b`.`type` = 2 )LEFT JOIN `glpi_groups` AS `glpi_groups_1358be41ea7158319a888236ffba5355` ON (`glpi_groups_tickets_819efb92c8b927b345e489211ec8e43b`.`groups_id` = `glpi_groups_1358be41ea7158319a888236ffba5355`.`id` ) LEFT JOIN `glpi_suppliers_tickets` AS `glpi_suppliers_tickets_819efb92c8b927b345e489211ec8e43b` ON (`glpi_tickets`.`id` = `glpi_suppliers_tickets_819efb92c8b927b345e489211ec8e43b`.`tickets_id` AND `glpi_suppliers_tickets_819efb92c8b927b345e489211ec8e43b`.`type` = 2 )LEFT JOIN `glpi_suppliers` AS `glpi_suppliers_d5ef7ac0b56c3f7be9b7468c412fee7e` ON (`glpi_suppliers_tickets_819efb92c8b927b345e489211ec8e43b`.`suppliers_id` = `glpi_suppliers_d5ef7ac0b56c3f7be9b7468c412fee7e`.`id` )LEFT JOIN `glpi_itilcategories` ON (`glpi_tickets`.`itilcategories_id` = `glpi_itilcategories`.`id` )LEFT JOIN `glpi_users` AS `glpi_users_users_id_lastupdater` ON (`glpi_tickets`.`users_id_lastupdater` = `glpi_users_users_id_lastupdater`.`id` ) LEFT JOIN `glpi_objectlocks` ON (`glpi_tickets`.`id` = `glpi_objectlocks`.`items_id` AND `glpi_objectlocks`.`itemtype` = 'Ticket' ) LEFT JOIN `glpi_users` AS `glpi_users_4c50bb4ba5e803e7e3493efa290fa313` ON (`glpi_objectlocks`.`users_id` = `glpi_users_4c50bb4ba5e803e7e3493efa290fa313`.`id` )LEFT JOIN `glpi_requesttypes` ON (`glpi_tickets`.`requesttypes_id` = `glpi_requesttypes`.`id` )LEFT JOIN `glpi_locations` ON (`glpi_tickets`.`locations_id` = `glpi_locations`.`id` ) LEFT JOIN `glpi_documents_items` ON (`glpi_tickets`.`id` = `glpi_documents_items`.`items_id` AND `glpi_documents_items`.`itemtype` = 'Ticket' ) LEFT JOIN `glpi_documents` AS `glpi_documents_2d98e43dfecb07952ef329c36da01250` ON (`glpi_documents_items`.`documents_id` = `glpi_documents_2d98e43dfecb07952ef329c36da01250`.`id` ) LEFT JOIN `glpi_groups_tickets` AS `glpi_groups_tickets_d1524bb2ea1d461ab90aed3b5f0e7e60` ON (`glpi_tickets`.`id` = `glpi_groups_tickets_d1524bb2ea1d461ab90aed3b5f0e7e60`.`tickets_id` AND `glpi_groups_tickets_d1524bb2ea1d461ab90aed3b5f0e7e60`.`type` = 1 )LEFT JOIN `glpi_groups` AS `glpi_groups_a0fdb25a4e0967f334115fb0dbcee9ce` ON (`glpi_groups_tickets_d1524bb2ea1d461ab90aed3b5f0e7e60`.`groups_id` = `glpi_groups_a0fdb25a4e0967f334115fb0dbcee9ce`.`id` )LEFT JOIN `glpi_users` AS `glpi_users_users_id_recipient` ON (`glpi_tickets`.`users_id_recipient` = `glpi_users_users_id_recipient`.`id` ) LEFT JOIN `glpi_tickets_users` AS `glpi_tickets_users_d86d1fe2a1ea996e3820de82e6aa57e8` ON (`glpi_tickets`.`id` = `glpi_tickets_users_d86d1fe2a1ea996e3820de82e6aa57e8`.`tickets_id` AND `glpi_tickets_users_d86d1fe2a1ea996e3820de82e6aa57e8`.`type` = 3 )LEFT JOIN `glpi_users` AS `glpi_users_b746b14c5f912caf02dd66b0df98d264` ON (`glpi_tickets_users_d86d1fe2a1ea996e3820de82e6aa57e8`.`users_id` = `glpi_users_b746b14c5f912caf02dd66b0df98d264`.`id` ) LEFT JOIN `glpi_groups_tickets` AS `glpi_groups_tickets_d86d1fe2a1ea996e3820de82e6aa57e8` ON (`glpi_tickets`.`id` = `glpi_groups_tickets_d86d1fe2a1ea996e3820de82e6aa57e8`.`tickets_id` AND `glpi_groups_tickets_d86d1fe2a1ea996e3820de82e6aa57e8`.`type` = 3 )LEFT JOIN `glpi_groups` AS `glpi_groups_c4fd3c0e88c6dca4af1d451af9d747fb` ON (`glpi_groups_tickets_d86d1fe2a1ea996e3820de82e6aa57e8`.`groups_id` = `glpi_groups_c4fd3c0e88c6dca4af1d451af9d747fb`.`id` )LEFT JOIN `glpi_slas` AS `glpi_slas_slas_tto_id_bb5aab1a526f6069c73375c529fafec7` ON (`glpi_tickets`.`slas_tto_id` = `glpi_slas_slas_tto_id_bb5aab1a526f6069c73375c529fafec7`.`id` AND `glpi_slas_slas_tto_id_bb5aab1a526f6069c73375c529fafec7`.`type` = '1' )LEFT JOIN `glpi_slas` AS `glpi_slas_slas_ttr_id_f3aab278f60e510b77ec99388d401d84` ON (`glpi_tickets`.`slas_ttr_id` = `glpi_slas_slas_ttr_id_f3aab278f60e510b77ec99388d401d84`.`id` AND `glpi_slas_slas_ttr_id_f3aab278f60e510b77ec99388d401d84`.`type` = '0' ) LEFT JOIN `glpi_slalevels_tickets` ON (`glpi_tickets`.`id` = `glpi_slalevels_tickets`.`tickets_id` )LEFT JOIN `glpi_slalevels` AS `glpi_slalevels_b3496fc202f417bdbcf7196c9852bb44` ON (`glpi_slalevels_tickets`.`slalevels_id` = `glpi_slalevels_b3496fc202f417bdbcf7196c9852bb44`.`id` )LEFT JOIN `glpi_olas` AS `glpi_olas_olas_tto_id_bb5aab1a526f6069c73375c529fafec7` ON (`glpi_tickets`.`olas_tto_id` = `glpi_olas_olas_tto_id_bb5aab1a526f6069c73375c529fafec7`.`id` AND `glpi_olas_olas_tto_id_bb5aab1a526f6069c73375c529fafec7`.`type` = '1' )LEFT JOIN `glpi_olas` AS `glpi_olas_olas_ttr_id_f3aab278f60e510b77ec99388d401d84` ON (`glpi_tickets`.`olas_ttr_id` = `glpi_olas_olas_ttr_id_f3aab278f60e510b77ec99388d401d84`.`id` AND `glpi_olas_olas_ttr_id_f3aab278f60e510b77ec99388d401d84`.`type` = '0' ) LEFT JOIN `glpi_olalevels_tickets` ON (`glpi_tickets`.`id` = `glpi_olalevels_tickets`.`tickets_id` )LEFT JOIN `glpi_olalevels` AS `glpi_olalevels_ef6f69a2a882a9c957c5861574cf3188` ON (`glpi_olalevels_tickets`.`olalevels_id` = `glpi_olalevels_ef6f69a2a882a9c957c5861574cf3188`.`id` ) LEFT JOIN `glpi_ticketvalidations` ON (`glpi_tickets`.`id` = `glpi_ticketvalidations`.`tickets_id` )LEFT JOIN `glpi_users` AS `glpi_users_57751ba960bd8511d2ad8a01bd8487f4` ON (`glpi_ticketvalidations`.`users_id` = `glpi_users_57751ba960bd8511d2ad8a01bd8487f4`.`id` )LEFT JOIN `glpi_users` AS `glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4` ON (`glpi_ticketvalidations`.`users_id_validate` = `glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4`.`id` ) LEFT JOIN `glpi_ticketsatisfactions` ON (`glpi_tickets`.`id` = `glpi_ticketsatisfactions`.`tickets_id` ) LEFT JOIN `glpi_ticketfollowups` ON (`glpi_tickets`.`id` = `glpi_ticketfollowups`.`tickets_id` )LEFT JOIN `glpi_requesttypes` AS `glpi_requesttypes_c38aefef0996a025032b9f8e81ceee2a` ON (`glpi_ticketfollowups`.`requesttypes_id` = `glpi_requesttypes_c38aefef0996a025032b9f8e81ceee2a`.`id` )LEFT JOIN `glpi_users` AS `glpi_users_c38aefef0996a025032b9f8e81ceee2a` ON (`glpi_ticketfollowups`.`users_id` = `glpi_users_c38aefef0996a025032b9f8e81ceee2a`.`id` ) LEFT JOIN `glpi_tickettasks` ON (`glpi_tickets`.`id` = `glpi_tickettasks`.`tickets_id` )LEFT JOIN `glpi_taskcategories` AS `glpi_taskcategories_e5ca2f53018fdc28a31faf534186b3a2` ON (`glpi_tickettasks`.`taskcategories_id` = `glpi_taskcategories_e5ca2f53018fdc28a31faf534186b3a2`.`id` )LEFT JOIN `glpi_users` AS `glpi_users_e5ca2f53018fdc28a31faf534186b3a2` ON (`glpi_tickettasks`.`users_id` = `glpi_users_e5ca2f53018fdc28a31faf534186b3a2`.`id` )LEFT JOIN `glpi_users` AS `glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2` ON (`glpi_tickettasks`.`users_id_tech` = `glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`id` )LEFT JOIN `glpi_groups` AS `glpi_groups_groups_id_tech_e5ca2f53018fdc28a31faf534186b3a2` ON (`glpi_tickettasks`.`groups_id_tech` = `glpi_groups_groups_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`id` )LEFT JOIN `glpi_tasktemplates` AS `glpi_tasktemplates_e5ca2f53018fdc28a31faf534186b3a2` ON (`glpi_tickettasks`.`tasktemplates_id` = `glpi_tasktemplates_e5ca2f53018fdc28a31faf534186b3a2`.`id` ) LEFT JOIN `glpi_tickets_tickets` ON ((`glpi_tickets`.`id` = `glpi_tickets_tickets`.`tickets_id_1` OR `glpi_tickets`.`id` = `glpi_tickets_tickets`.`tickets_id_2`) ) LEFT JOIN `glpi_tickets_tickets` AS `glpi_tickets_tickets_9b9f1a767329ed99d9c2a164b41de828` ON ((`glpi_tickets`.`id` = `glpi_tickets_tickets_9b9f1a767329ed99d9c2a164b41de828`.`tickets_id_1` OR `glpi_tickets`.`id` = `glpi_tickets_tickets_9b9f1a767329ed99d9c2a164b41de828`.`tickets_id_2`) AND `glpi_tickets_tickets_9b9f1a767329ed99d9c2a164b41de828`.`link` = 2 ) LEFT JOIN `glpi_tickets_tickets` AS `glpi_tickets_tickets_9ea26d5c9bb1204c106dce61d751f4eb` ON (`glpi_tickets`.`id` = `glpi_tickets_tickets_9ea26d5c9bb1204c106dce61d751f4eb`.`tickets_id_1` AND `glpi_tickets_tickets_9ea26d5c9bb1204c106dce61d751f4eb`.`link` = 3 )LEFT JOIN `glpi_tickets` AS `glpi_tickets_tickets_id_2_5902dd14035b2dbb2510a1e55d1c9a4a` ON (`glpi_tickets_tickets_9ea26d5c9bb1204c106dce61d751f4eb`.`tickets_id_2` = `glpi_tickets_tickets_id_2_5902dd14035b2dbb2510a1e55d1c9a4a`.`id` ) LEFT JOIN `glpi_tickets_tickets` AS `glpi_tickets_tickets_48b11680da9cd90521f248d617a22048` ON (`glpi_tickets`.`id` = `glpi_tickets_tickets_48b11680da9cd90521f248d617a22048`.`tickets_id_2` AND `glpi_tickets_tickets_48b11680da9cd90521f248d617a22048`.`link` = 3 )LEFT JOIN `glpi_tickets` AS `glpi_tickets_tickets_id_1_5902dd14035b2dbb2510a1e55d1c9a4a` ON (`glpi_tickets_tickets_48b11680da9cd90521f248d617a22048`.`tickets_id_1` = `glpi_tickets_tickets_id_1_5902dd14035b2dbb2510a1e55d1c9a4a`.`id` ) LEFT JOIN `glpi_itilsolutions` ON (`glpi_tickets`.`id` = `glpi_itilsolutions`.`items_id` AND `glpi_itilsolutions`.`itemtype` = 'Ticket' ) LEFT JOIN `glpi_solutiontypes` AS `glpi_solutiontypes_d493e99d999206eb61c5eb189f85a158` ON (`glpi_itilsolutions`.`solutiontypes_id` = `glpi_solutiontypes_d493e99d999206eb61c5eb189f85a158`.`id` ) LEFT JOIN `glpi_itilsolutions` AS `glpi_itilsolutions_da457b745ecdb66b5b408f7e501bb69b` ON (`glpi_tickets`.`id` = `glpi_itilsolutions_da457b745ecdb66b5b408f7e501bb69b`.`items_id` AND `glpi_itilsolutions_da457b745ecdb66b5b408f7e501bb69b`.`itemtype` = 'Ticket' AND `glpi_itilsolutions_da457b745ecdb66b5b408f7e501bb69b`.`id` = ( SELECT `id` FROM `glpi_itilsolutions` WHERE `glpi_itilsolutions`.`items_id` = `glpi_tickets`.`id` AND `glpi_itilsolutions`.`itemtype` = 'Ticket' ORDER BY `glpi_itilsolutions`.`id` DESC LIMIT 1 ) ) LEFT JOIN `glpi_ticketcosts` ON (`glpi_tickets`.`id` = `glpi_ticketcosts`.`tickets_id` ) LEFT JOIN `glpi_problems_tickets` ON (`glpi_tickets`.`id` = `glpi_problems_tickets`.`tickets_id` ) WHERE `glpi_tickets`.`is_deleted` = 0 AND ( ( (`glpi_tickets`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`content` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`id` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`status` LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`date` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`closedate` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`time_to_resolve` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (IF(`glpi_tickets`.`time_to_resolve` IS NOT NULL AND `glpi_tickets`.`status` <> 4 AND (`glpi_tickets`.`solvedate` > `glpi_tickets`.`time_to_resolve` OR (`glpi_tickets`.`solvedate` IS NULL AND `glpi_tickets`.`time_to_resolve` < NOW())), 1, 0) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`solvedate` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`date_mod` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_itilcategories`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_entities`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_users_id_lastupdater`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_lastupdater`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_lastupdater`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_users_id_lastupdater`.`realname`, ' ', `glpi_users_users_id_lastupdater`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (((`glpi_users_4c50bb4ba5e803e7e3493efa290fa313`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_4c50bb4ba5e803e7e3493efa290fa313`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_4c50bb4ba5e803e7e3493efa290fa313`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_4c50bb4ba5e803e7e3493efa290fa313`.`realname`, ' ', `glpi_users_4c50bb4ba5e803e7e3493efa290fa313`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (CONVERT(`glpi_objectlocks`.`date_mod` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`time_to_own` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (IF(`glpi_tickets`.`time_to_own` IS NOT NULL AND `glpi_tickets`.`status` <> 4 AND (`glpi_tickets`.`takeintoaccount_delay_stat` > TIME_TO_SEC(TIMEDIFF(`glpi_tickets`.`time_to_own`, `glpi_tickets`.`date`)) OR (`glpi_tickets`.`takeintoaccount_delay_stat` = 0 AND `glpi_tickets`.`time_to_own` < NOW())), 1, 0) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`internal_time_to_resolve` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (IF(`glpi_tickets`.`internal_time_to_resolve` IS NOT NULL AND `glpi_tickets`.`status` <> 4 AND (`glpi_tickets`.`solvedate` > `glpi_tickets`.`internal_time_to_resolve` OR (`glpi_tickets`.`solvedate` IS NULL AND `glpi_tickets`.`internal_time_to_resolve` < NOW())), 1, 0) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickets`.`internal_time_to_own` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (IF(`glpi_tickets`.`internal_time_to_own` IS NOT NULL AND `glpi_tickets`.`status` <> 4 AND (`glpi_tickets`.`takeintoaccount_delay_stat` > TIME_TO_SEC(TIMEDIFF(`glpi_tickets`.`internal_time_to_own`, `glpi_tickets`.`date`)) OR (`glpi_tickets`.`takeintoaccount_delay_stat` = 0 AND `glpi_tickets`.`internal_time_to_own` < NOW())), 1, 0) LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`type` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_items_tickets`.`itemtype` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_requesttypes`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`address` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`postcode` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`town` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`state` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`country` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`building` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`room` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`comment` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`latitude` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_locations`.`longitude` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`realname`, ' ', `glpi_users_a5e2026cbcb683e774f93a59e24a62a4`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) OR (`glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`alternative_email` LIKE '%TESTTESTTESTTEST%' )) OR (`glpi_groups_a0fdb25a4e0967f334115fb0dbcee9ce`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_users_id_recipient`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_recipient`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_recipient`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_users_id_recipient`.`realname`, ' ', `glpi_users_users_id_recipient`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (((`glpi_users_b746b14c5f912caf02dd66b0df98d264`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_b746b14c5f912caf02dd66b0df98d264`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_b746b14c5f912caf02dd66b0df98d264`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_b746b14c5f912caf02dd66b0df98d264`.`realname`, ' ', `glpi_users_b746b14c5f912caf02dd66b0df98d264`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) OR (`glpi_tickets_users_d86d1fe2a1ea996e3820de82e6aa57e8`.`alternative_email` LIKE '%TESTTESTTESTTEST%' )) OR (`glpi_groups_c4fd3c0e88c6dca4af1d451af9d747fb`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`realname`, ' ', `glpi_users_f201be21cd638ee780d08cba4ceff0d4`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) OR (`glpi_tickets_users_819efb92c8b927b345e489211ec8e43b`.`alternative_email` LIKE '%TESTTESTTESTTEST%' )) OR (`glpi_suppliers_d5ef7ac0b56c3f7be9b7468c412fee7e`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_groups_1358be41ea7158319a888236ffba5355`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`use_notification` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets_users_d1524bb2ea1d461ab90aed3b5f0e7e60`.`alternative_email` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_slas_slas_tto_id_bb5aab1a526f6069c73375c529fafec7`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_slas_slas_ttr_id_f3aab278f60e510b77ec99388d401d84`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_slalevels_b3496fc202f417bdbcf7196c9852bb44`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_olas_olas_tto_id_bb5aab1a526f6069c73375c529fafec7`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_olas_olas_ttr_id_f3aab278f60e510b77ec99388d401d84`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_olalevels_ef6f69a2a882a9c957c5861574cf3188`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`validation_percent` LIKE '%TESTTESTTESTTEST%' ) OR `glpi_tickets`.`global_validation` IN ('TESTTESTTESTTEST') OR (`glpi_ticketvalidations`.`comment_submission` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_ticketvalidations`.`comment_validation` LIKE '%TESTTESTTESTTEST%' ) OR `glpi_ticketvalidations`.`status` IN ('TESTTESTTESTTEST') OR (CONVERT(`glpi_ticketvalidations`.`submission_date` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_ticketvalidations`.`validation_date` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_57751ba960bd8511d2ad8a01bd8487f4`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_57751ba960bd8511d2ad8a01bd8487f4`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_57751ba960bd8511d2ad8a01bd8487f4`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_57751ba960bd8511d2ad8a01bd8487f4`.`realname`, ' ', `glpi_users_57751ba960bd8511d2ad8a01bd8487f4`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (((`glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4`.`realname`, ' ', `glpi_users_users_id_validate_57751ba960bd8511d2ad8a01bd8487f4`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (`glpi_ticketsatisfactions`.`type` LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_ticketsatisfactions`.`date_begin` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_ticketsatisfactions`.`date_answered` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_ticketsatisfactions`.`satisfaction` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_ticketsatisfactions`.`comment` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_ticketfollowups`.`content` LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_ticketfollowups`.`date` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_requesttypes_c38aefef0996a025032b9f8e81ceee2a`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_ticketfollowups`.`is_private` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_c38aefef0996a025032b9f8e81ceee2a`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_c38aefef0996a025032b9f8e81ceee2a`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_c38aefef0996a025032b9f8e81ceee2a`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_c38aefef0996a025032b9f8e81ceee2a`.`realname`, ' ', `glpi_users_c38aefef0996a025032b9f8e81ceee2a`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (`glpi_tickettasks`.`content` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_taskcategories_e5ca2f53018fdc28a31faf534186b3a2`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickettasks`.`is_private` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_users_e5ca2f53018fdc28a31faf534186b3a2`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_e5ca2f53018fdc28a31faf534186b3a2`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_e5ca2f53018fdc28a31faf534186b3a2`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_e5ca2f53018fdc28a31faf534186b3a2`.`realname`, ' ', `glpi_users_e5ca2f53018fdc28a31faf534186b3a2`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (((`glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`realname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`firstname` LIKE '%TESTTESTTESTTEST%' OR `glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`name` LIKE '%TESTTESTTESTTEST%' OR CONCAT(`glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`realname`, ' ', `glpi_users_users_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`firstname`) LIKE '%TESTTESTTESTTEST%' ) ) ) OR (`glpi_groups_groups_id_tech_e5ca2f53018fdc28a31faf534186b3a2`.`completename` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickettasks`.`actiontime` LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickettasks`.`date` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickettasks`.`state` LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickettasks`.`begin` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (CONVERT(`glpi_tickettasks`.`end` USING utf8) LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tasktemplates_e5ca2f53018fdc28a31faf534186b3a2`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`solve_delay_stat` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`close_delay_stat` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`waiting_duration` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_tickets`.`takeintoaccount_delay_stat` LIKE '%TESTTESTTESTTEST%' ) OR (((`glpi_tickets_tickets`.`tickets_id_1` = 'TESTTESTTESTTEST' OR `glpi_tickets_tickets`.`tickets_id_2` = 'TESTTESTTESTTEST') AND `glpi_tickets`.`id` <> 'TESTTESTTESTTEST') ) OR (((`glpi_tickets_tickets_9b9f1a767329ed99d9c2a164b41de828`.`tickets_id_1` = 'TESTTESTTESTTEST' OR `glpi_tickets_tickets_9b9f1a767329ed99d9c2a164b41de828`.`tickets_id_2` = 'TESTTESTTESTTEST') AND `glpi_tickets`.`id` <> 'TESTTESTTESTTEST') ) OR (`glpi_solutiontypes_d493e99d999206eb61c5eb189f85a158`.`name` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_itilsolutions`.`content` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_itilsolutions`.`status` LIKE '%TESTTESTTESTTEST%' ) OR (`glpi_itilsolutions_da457b745ecdb66b5b408f7e501bb69b`.`status` LIKE '%TESTTESTTESTTEST%' ) ) ) GROUP BY `glpi_tickets`.`id` ORDER BY ITEM_4 DESC | 14.886 |  
7 | SHOW WARNINGS

[code]   GLPI 9.3.1 ( => /var/www/glpi) Installation mode: TARBALL

Operating system: Linux glpidev 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 PHP 7.2.10-0ubuntu0.18.04.1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, memcache, mysqli, mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, pspell, readline, recode, session, shmop, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zlib) Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files" upload_max_filesize="2M" Software: Apache/2.4.29 (Ubuntu) (Apache/2.4.29 (Ubuntu) Server at 192.168.1.108 Port 80) Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Server Software: Ubuntu 18.04 Server Version: 10.1.34-MariaDB-0ubuntu0.18.04.1 Server SQL Mode: Parameters: glpidbuser@localhost/glpidb Host info: Localhost via UNIX socket mysqli extension is installed ctype extension is installed fileinfo extension is installed json extension is installed mbstring extension is installed zlib extension is installed curl extension is installed gd extension is installed simplexml extension is installed xml extension is installed ldap extension is installed imap extension is installed Zend OPcache extension is installed APCu extension is installed xmlrpc extension is installed CAS extension is not present Database version seems correct (10.1.34) - Perfect! /var/www/glpi/files/_log : OK /var/www/glpi/config : OK /var/www/glpi/files : OK /var/www/glpi/files/_dumps : OK /var/www/glpi/files/_sessions : OK /var/www/glpi/files/_cron : OK /var/www/glpi/files/_graphs : OK /var/www/glpi/files/_lock : OK /var/www/glpi/files/_plugins : OK /var/www/glpi/files/_tmp : OK /var/www/glpi/files/_cache : OK /var/www/glpi/files/_rss : OK /var/www/glpi/files/_uploads : OK /var/www/glpi/files/_pictures : OK Web access to the files directory should not be allowed Check the .htaccess file and the web server configuration.

htmLawed version 1.2.4 in (/var/www/glpi/lib/htmlawed) SimplePie version 1.5.2 in (/var/www/glpi/vendor/simplepie/simplepie/library) TCPDF version 6.2.17 in (/var/www/glpi/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/var/www/glpi/vendor/michelf/php-markdown/Michelf) true/punycode in (/var/www/glpi/vendor/true/punycode/src) iacaml/autolink in (/var/www/glpi/vendor/iamcal/lib_autolink) sabre/vobject in (/var/www/glpi/vendor/sabre/vobject/lib)

Server: 'dcsdf.xy.de', Port: '389', BaseDN: 'dc=dfad, dc=de', Connection filter: '(&(objectClass=user)(objectCategory=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))', RootDN: 'cn=IT-Support, cn=Users, dc=sdsfsa, dc= de', Use TLS: none

Not active

Way of sending emails: SMTP (anonymous@smtprelay.dafssdfads.de)

Name: 'it-support@dafsdfd.de' Active: Yes Server: '{e24324x.dfasdfasdf.de:993/imap/ssl/novalidate-cert/notls}' Login: 'glpdafsdi@dfasdfasdf.de' Password: Yes

news Name: Alarme Version: 1.3.2.4 State: To be cleaned barcode Name: Barcode Version: 0.90+1.0 State: To be cleaned reports Name: Berichte Version: 1.7.2 State: To be cleaned dashboard Name: Dashboard Version: 0.8.1 State: To be cleaned datainjection Name: File injection Version: 2.3.1 State: To be cleaned formcreator Name: Formulare Version: 2.6.3 State: To be cleaned addressing Name: IP Adressierung Version: 2.3.0 State: To be cleaned mreporting Name: More Reporting Version: 1.3.1 State: To be cleaned pdf Name: PDF-Ausgabe Version: 1.1 State: To be cleaned ticketcleaner Name: Ticket Cleaner Version: 2.0.4 State: To be cleaned [/code]

trasher commented 6 years ago

wait much more without innodb

Well, your issue may be solved migrating to innodb... This is not required right now, but this will be in the future, since we may rely on innodb only capabilities. So, do the switch anyways.

Armin83 commented 6 years ago

Yes but this only query blocks all other in my system also with innodb all other session are waiting

trasher commented 6 years ago

Well, that was not clear in your initial message.

Search query depends on search parameters of course, but also on display parameters for current user. Take a look at those to see which one make this query so huge.

Armin83 commented 6 years ago

Only minimum fields reducesd-display

No one is working:

MariaDB [(none)]> show open tables WHERE In_use > 0;
Empty set (0.01 sec)

I start the only the search.

MariaDB [(none)]> show open tables where in_use > 0;
+----------+--------------------------+--------+-------------+
| Database | Table                    | In_use | Name_locked |
+----------+--------------------------+--------+-------------+
| glpidb   | glpi_itilsolutions       |      3 |           0 |
| glpidb   | glpi_suppliers           |      1 |           0 |
| glpidb   | glpi_items_tickets       |      1 |           0 |
| glpidb   | glpi_olalevels           |      1 |           0 |
| glpidb   | glpi_slalevels           |      1 |           0 |
| glpidb   | glpi_tickettasks         |      1 |           0 |
| glpidb   | glpi_locations           |      1 |           0 |
| glpidb   | glpi_tickets_users       |      3 |           0 |
| glpidb   | glpi_objectlocks         |      1 |           0 |
| glpidb   | glpi_ticketvalidations   |      1 |           0 |
| glpidb   | glpi_documents_items     |      1 |           0 |
| glpidb   | glpi_users               |     12 |           0 |
| glpidb   | glpi_slalevels_tickets   |      1 |           0 |
| glpidb   | glpi_suppliers_tickets   |      1 |           0 |
| glpidb   | glpi_olalevels_tickets   |      1 |           0 |
| glpidb   | glpi_ticketcosts         |      1 |           0 |
| glpidb   | glpi_documents           |      1 |           0 |
| glpidb   | glpi_ticketsatisfactions |      1 |           0 |
| glpidb   | glpi_tickets_tickets     |      4 |           0 |
| glpidb   | glpi_ticketfollowups     |      1 |           0 |
| glpidb   | glpi_solutiontypes       |      1 |           0 |
| glpidb   | glpi_tasktemplates       |      1 |           0 |
| glpidb   | glpi_tickets             |      4 |           0 |
| glpidb   | glpi_groups              |      4 |           0 |
| glpidb   | glpi_groups_tickets      |      3 |           0 |
| glpidb   | glpi_taskcategories      |      1 |           0 |
| glpidb   | glpi_itilcategories      |      1 |           0 |
| glpidb   | glpi_problems_tickets    |      1 |           0 |
| glpidb   | glpi_slas                |      2 |           0 |
| glpidb   | glpi_olas                |      2 |           0 |
| glpidb   | glpi_requesttypes        |      2 |           0 |
| glpidb   | glpi_entities            |      1 |           0 |
+----------+--------------------------+--------+-------------+
32 rows in set (0.00 sec)

I did a better test.

I think it is normal that if i use the same browser (with innodb). that a second tab hangs until i have the search result in the first tab or isn't it ? (but this is no problem for me so we could imho close my issue)

trasher commented 6 years ago

There are known historical issues on large "locks" with myisam, so yes, this seems "normal". All of this seems sql server issues, not directly related to GLPI. Tests on MYISAM are useless. InnoDB will become the only supported engine; and a well working script to do the migration is provided. This has not been automated just for users can plan (since this may take some time on huge instances).

If I've understand (what you said is still not clear to me); you are facing a MYISAM lock issue; solution for that is to migrate to INNODB.

cedric-anne commented 6 years ago

@Armin83

I think it is normal that if i use the same browser (with innodb). that a second tab hangs until i have the search result in the first tab or isn't it ?

It is normal. PHP locks the session file when a session has been opened by a script, until script finishes or a call to session_write_close() is made (See http://php.net/manual/en/session.examples.basic.php). So if you open multiple pages using the same session (defined by the session cookie value), requests will be queued.

Armin83 commented 6 years ago

@cedric-anne Thanks - i will wait vor 9.3.2 and then i upgrade to mariadb and innodb too.