Closed mat44444 closed 4 years ago
Informations requested in ticket template has not been provided.
GLPI setup added
Hi,
Technically, it could be improved by doing 2 queries instead of 1. The first one to count items matching search criteria (only a SELECT COUNT
with all criteria to apply), and a second one to fetch only displayed elements. But it is actually really hard to implement as code of search engine is nor well documented, nor well automatically tested.
But, unless content of your tickets are really huge, you should not face such performances issues with only 500 tickets in your DB. For instance, I made a test on a production server, and it tooks me only 1.72 s
to display a list of 50 tickets, sorted by their name, from a database containing 18500 tickets.
So you should try to tweak your database server.
As this is not a bug, and as performances enhancement on this point will not be adressed soon, I close the issue.
Feel free to ask for community support on forums.
Regards
Describe the bug
We use mail collector to received more than 95% of our ticket. Apparently, when we go in the list ticket page, the code automatically load in the sql request the glpi_tickets.content field. Probably for the preview feature because it was not set in the view.
Saddly, there a lot of html content due to the mailcollector and the requested take more then 5 second to load content. With debug we get this query who take more 99% of the load time.
SELECT DISTINCT
glpi_tickets.
idAS id, 'LecomptM' AS currentuser,
glpi_tickets.
idAS
ITEM_Ticket_2,
glpi_tickets.
nameAS
ITEM_Ticket_1,
glpi_tickets.
idAS
ITEM_Ticket_1_id,
glpi_tickets.
idAS
ITEM_Ticket_1_id,
glpi_tickets.
contentAS
ITEM_Ticket_1_content,
glpi_tickets.
statusAS
ITEM_Ticket_1_status,
glpi_entities.
completenameAS
ITEM_Ticket_80,
glpi_tickets.
statusAS
ITEM_Ticket_12,
glpi_tickets.
date_modAS
ITEM_Ticket_19,
glpi_tickets.
dateAS
ITEM_Ticket_15,
glpi_itilcategories.
completenameAS
ITEM_Ticket_7, GROUP_CONCAT(DISTINCT
glpi_users_f201be21cd638ee780d08cba4ceff0d4.
idSEPARATOR '$$##$$') AS
ITEM_Ticket_5, GROUP_CONCAT(DISTINCT CONCAT(
glpi_tickets_users_819efb92c8b927b345e489211ec8e43b.
users_id, ' ',
glpi_tickets_users_819efb92c8b927b345e489211ec8e43b.
alternative_email) SEPARATOR '$$##$$') AS
ITEM_Ticket_5_2,
glpi_tickets.
priorityAS
ITEM_Ticket_3FROM
glpi_ticketsLEFT JOIN
glpi_entitiesON (
glpi_tickets.
entities_id=
glpi_entities.
id) LEFT JOIN
glpi_itilcategoriesON (
glpi_tickets.
itilcategories_id=
glpi_itilcategories.
id) LEFT JOIN
glpi_tickets_usersAS
glpi_tickets_users_819efb92c8b927b345e489211ec8e43bON (
glpi_tickets.
id=
glpi_tickets_users_819efb92c8b927b345e489211ec8e43b.
tickets_idAND
glpi_tickets_users_819efb92c8b927b345e489211ec8e43b.
type= 2 ) LEFT JOIN
glpi_usersAS
glpi_users_f201be21cd638ee780d08cba4ceff0d4ON (
glpi_tickets_users_819efb92c8b927b345e489211ec8e43b.
users_id=
glpi_users_f201be21cd638ee780d08cba4ceff0d4.
id) WHERE
glpi_tickets.
is_deleted= 0 AND (
glpi_tickets.
statusIN ('1','2','3','4') ) GROUP BY
glpi_tickets.
idORDER BY ITEM_Ticket_19 DESC
Forcefully remove the glpi_tickets.content solve the performance issue.
So make an option to remove glpi_tickets.content call bye disable the preview feature. Or let the preview feature make is own call to sql when the mouse is over the link.
On our side the defaut parameter return around 500 ticket filtered by 25 tickets by page, but the request return the data of 500 tickets.
Page(s) URL
https://.../front/ticket.php
To reproduce
Steps to reproduce the behavior:
Expected behavior
Page should load more quickly
Screenshots
If applicable, add screenshots to help explain your problem.
Your GLPI setup (you can find it in Setup > General menu, System tab)
Additional context
Add any other context about the problem here.