You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-11-29 17:09:55

falco2001
Guest
Registered: 2016-02-11
Posts: 75

[GLPI 9.2.2][ Fusion 9.2+1.0] Problème fusion GLPI inutilisable

Bonjour,
les requêtes de fusion mettent un temps fou, de plus nous avons ce message "waiting for table level lock"
Nous sommes donc en panne, j'ai dû désactiver ce plug-in.
J'ai même  vidé les tables de logs de fusion, problème idem
En regardant les requêtes et leur plan d’exécution on s'aperçoit que par exemple la première requête lancée par fusion via le menu met 6 minutes à s’exécuter et que les index ne sont pas utilisés. J'ai créé des index bien sûr sans amélioration
les tables de fusions comme states ou software ont 6 millions d'entrées
comme

-- Connection Id: 70515609
-- User: ydaoulat
-- Host: domu:59838
-- DB: glpidev
-- Command: Query
-- Time: 32
-- State: Sending data
   SELECT
                    task.`id` AS 'task.id',
task.`name` AS 'task.name',
job.`id` AS 'job.id',
job.`name` AS 'job.name',
job.`method` AS 'job.method',
agent.`id` AS 'agent.id',
agent.`name` AS 'agent.name',
agent.`computers_id` AS 'agent.computers_id',
run.`id` AS 'run.id',
run.`itemtype` AS 'run.itemtype',
run.`items_id` AS 'run.items_id',
run.`state` AS 'run.state',
log.`date` AS 'log.last_date',
UNIX_TIMESTAMP(log.`date`) AS 'log.last_timestamp',
log.`id` AS 'log.last_id',
log.`comment` AS 'log.last_comment'
                    FROM `glpi_plugin_fusioninventory_agents` AS agent
                    
         INNER JOIN (
            SELECT
               MAX(run.`id`) AS max_id,
               run.`plugin_fusioninventory_agents_id`,
               run.`plugin_fusioninventory_taskjobs_id`,
               run.`items_id`, run.`itemtype`,
               MAX(log.`id`) AS max_log_id
            FROM (
               SELECT
                 *
               FROM (
                 SELECT
                     *,
                     @num := IF(@agent_id = plugin_fusioninventory_agents_id
                                && @taskjob_id = plugin_fusioninventory_taskjobs_id
                                && @items_id = items_id
                                && @itemtype = itemtype,
                                @num:= @num + 1, 1) AS row_num,
                     @agent_id:=plugin_fusioninventory_agents_id AS tmp_var1,
                     @taskjob_id:=plugin_fusioninventory_taskjobs_id AS tmp_var2,
                     @items_id:=items_id AS tmp_var3,
                     @itemtype:=itemtype AS tmp_var4
                  FROM glpi_plugin_fusioninventory_taskjobstates
                  ORDER BY plugin_fusioninventory_taskjobs_id,
                     plugin_fusioninventory_agents_id,
                     itemtype,
                     items_id,
                     id DESC
               ) AS limited_states
              WHERE row_num <= 2
            ) AS run
            LEFT JOIN `glpi_plugin_fusioninventory_taskjoblogs` AS log
               ON log.`plugin_fusioninventory_taskjobstates_id` = run.`id`
            GROUP BY
               run.`plugin_fusioninventory_agents_id`,
               run.`plugin_fusioninventory_taskjobs_id`,
               run.`items_id`, run.`itemtype`,
               run.`id`
         ) max_run
         ON max_run.`plugin_fusioninventory_agents_id` = agent.`id`
INNER JOIN `glpi_plugin_fusioninventory_taskjobstates` AS run
                                 ON max_run.`max_id` = run.`id`
LEFT JOIN `glpi_plugin_fusioninventory_taskjoblogs` as log
                                 ON max_run.`max_log_id` = log.`id`
INNER JOIN `glpi_plugin_fusioninventory_taskjobs` AS job
                                 ON job.`id` = run.`plugin_fusioninventory_taskjobs_id`
INNER JOIN `glpi_plugin_fusioninventory_tasks` as task
                                 ON job.`plugin_fusioninventory_tasks_id` = task.`id`
                    WHERE 1
AND ( `task`.`entities_id` IN ('7')  ) 
AND task.`id` IN (34,38,39,40,42,44,47,48,49,51,52,55,58,59,62,63,64,66,67,69,70,73,77,81,82,84,85,89,90,91,98,100,109,110,112,113,116,117,119,120,133,140,143,149,154,155,157,158)
                    GROUP BY job.`id`, agent.`id`, run.`id`, log.`id`
                    ORDER BY agent.`id` ASC, run.`id` DESC

des idées ?

Offline

#2 2018-11-30 09:19:59

falco2001
Guest
Registered: 2016-02-11
Posts: 75

Re: [GLPI 9.2.2][ Fusion 9.2+1.0] Problème fusion GLPI inutilisable

re,
peut-on vider certaines tables sans risque ? Merci

Offline

Board footer

Powered by FluxBB