PmaControl — détail des 16 requêtes applicatives Mesures sur l’instance de test, cinq chargements par version, après chauffe. Médianes en millisecondes côté pilote PHP. SQL structurel conservé ; valeurs de session paramétrées. La requête 3 seule change. Le total SQL médian vaut 14,53 ms avant et 14,59 ms après. Valeurs de session remplacées par des paramètres pour ne pas publier les identifiants du compte de mesure. Le SQL structurel est conservé. #### 1. Lire la session de connexion Source : `App/Library/Security/PersistentAuthSession.php:895`. Avant 0.31 ms ; après 0.34 ms. ```sql SELECT s.id AS persistent_auth_session_id, s.token_hash, s.previous_token_hash, s.previous_token_expires, s.user_agent_hash, s.ip_hash, s.date_last_used, s.date_expires, s.date_absolute_expires, s.date_revoked, u.* FROM `user_persistent_auth_session` s INNER JOIN `user_main` u ON u.id = s.id_user_main WHERE s.selector = :session_selector LIMIT 1 ``` #### 2. Actualiser la session Source : `App/Library/Security/PersistentAuthSession.php:895`. Avant 0.29 ms ; après 0.27 ms. ```sql UPDATE `user_persistent_auth_session` SET `date_last_used` = :date_last_used, `date_expires` = :date_expires WHERE `id` = :session_id AND `date_revoked` IS NULL ``` #### 3. Charger les 30 graphes et leurs dimensions Source : `App/Controller/Architecture.php:92`. Avant 5.86 ms ; après 5.57 ms. ```sql SELECT dg.id, dg.svg, dg.height, dg.width, (dg.height * dg.width) as area, dc.date_inserted as date_refresh FROM dot3_cluster dc JOIN dot3_graph dg ON dg.id = dc.id_dot3_graph WHERE dc.id_dot3_information = (COALESCE( ( SELECT di.is_svg_generated FROM dot3_information di WHERE di.is_svg_generated > 0 AND EXISTS ( SELECT 1 FROM dot3_cluster dc_ready WHERE dc_ready.id_dot3_information = di.is_svg_generated ) ORDER BY di.is_svg_generated DESC LIMIT 1 ), ( SELECT dc_previous.id_dot3_information FROM dot3_cluster dc_previous WHERE dc_previous.id_dot3_information < ( SELECT dc_latest.id_dot3_information FROM dot3_cluster dc_latest ORDER BY dc_latest.id_dot3_information DESC LIMIT 1 ) ORDER BY dc_previous.id_dot3_information DESC LIMIT 1 ), ( SELECT dc_any.id_dot3_information FROM dot3_cluster dc_any ORDER BY dc_any.id_dot3_information DESC LIMIT 1 ) )) ORDER BY dg.height DESC, dg.width DESC; ``` Après : ```sql SELECT dg.id, dg.svg, dg.height, dg.width, (dg.height * dg.width) as area, dc.date_inserted as date_refresh FROM dot3_cluster dc JOIN dot3_graph dg ON dg.id = dc.id_dot3_graph WHERE dc.id_dot3_information = (COALESCE( ( SELECT di.is_svg_generated FROM dot3_information di WHERE di.is_svg_generated > 0 AND ( SELECT dc_ready.id_dot3_information FROM dot3_cluster dc_ready WHERE dc_ready.id_dot3_information = di.is_svg_generated LIMIT 1 ) IS NOT NULL ORDER BY di.is_svg_generated DESC LIMIT 1 ), ( SELECT dc_previous.id_dot3_information FROM dot3_cluster dc_previous WHERE dc_previous.id_dot3_information < ( SELECT dc_latest.id_dot3_information FROM dot3_cluster dc_latest ORDER BY dc_latest.id_dot3_information DESC LIMIT 1 ) ORDER BY dc_previous.id_dot3_information DESC LIMIT 1 ), ( SELECT dc_any.id_dot3_information FROM dot3_cluster dc_any ORDER BY dc_any.id_dot3_information DESC LIMIT 1 ) )) ORDER BY dg.height DESC, dg.width DESC; ``` #### 4. Lister les clients Source : `App/Controller/Common.php:120`. Avant 0.37 ms ; après 0.34 ms. ```sql SELECT * from client order by libelle ``` #### 5. Lister les environnements Source : `App/Controller/Common.php:141`. Avant 0.23 ms ; après 0.27 ms. ```sql SELECT * from environment order by libelle ``` #### 6. Lister les tags Source : `App/Controller/Common.php:669`. Avant 0.23 ms ; après 0.29 ms. ```sql SELECT * FROM tag ORDER BY name ``` #### 7. Chercher le fil de navigation Source : `App/Library/Ariane.php:123`. Avant 0.71 ms ; après 1.07 ms. ```sql WITH a as (SELECT bg,bd, group_id FROM menu where `class`='fr' AND `method` = 'architecture' LIMIT 1) SELECT * FROM menu b,a WHERE b.bg <= a.bg AND b.bd >= a.bg AND a.group_id = b.group_id ORDER by b.bg ``` #### 8. Construire le menu Source : `App/Controller/Menu.php:73`. Avant 3.02 ms ; après 3.04 ms. ```sql SELECT b.*, MAX(c.id) AS dropdown FROM `menu_group` a INNER JOIN `menu` b ON a.id = b.group_id LEFT JOIN `menu` c ON b.bg < c.bg AND b.bd > c.bd AND c.active = 1 WHERE b.active = 1 and b.parent_id is not null and a.id='1' GROUP BY b.id ORDER BY b.bg ``` #### 9. Compter les alarmes actives Source : `App/Library/Alerting/ActiveAlarmBadge.php:50`. Avant 1.11 ms ; après 1.09 ms. ```sql SELECT COALESCE(SUM(`severity` IN ('error','critical','alert','emergency')),0) AS `critical`,COALESCE(SUM(`severity` IN ('warning')),0) AS `warning` FROM `pmc_event_alert` WHERE `kind`='alert' AND `status` IN ('open','acknowledged') ``` #### 10. Sélectionner la rubrique du menu Source : `App/Controller/Menu.php:278`. Avant 0.67 ms ; après 0.67 ms. ```sql WITH a as (SELECT bg,bd, group_id FROM menu where `class`='Architecture' AND `method` = 'index' AND parent_id is not null LIMIT 1) SELECT * FROM menu b,a WHERE b.bg <= a.bg AND b.bd >= a.bg AND a.group_id = b.group_id AND parent_id is not null ORDER by b.bg ``` #### 11. Vérifier la clé de traduction Source : `Glial/I18n/I18n.php:949`. Avant 0.33 ms ; après 0.31 ms. ```sql SELECT 1 FROM `translation_glial` WHERE `key` = '3a99366113694328061626221409cbe4b107ea37' AND `language` = 'en' AND `file_found` = 'App/view/Menu/show.view.php' LIMIT 1 ``` #### 12. Lire la traduction Source : `Glial/I18n/I18n.php:364`. Avant 0.30 ms ; après 0.29 ms. ```sql SELECT COALESCE(tm.text, tg.target_text) AS target_text FROM translation_google tg LEFT JOIN translation_main tm ON tm.key = tg.key AND tm.destination = tg.target_language WHERE tg.`key` = '3a99366113694328061626221409cbe4b107ea37' AND tg.`target_language` = 'fr' ``` #### 13. Vérifier la table de configuration Source : `App/Library/License/LicenseManager.php:585`. Avant 0.33 ms ; après 0.31 ms. ```sql SELECT COUNT(*) AS cpt FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'application_config' ``` #### 14. Lire les paramètres de licence Source : `App/Library/License/LicenseManager.php:611`. Avant 0.22 ms ; après 0.23 ms. ```sql SELECT `name`, `value` FROM `application_config` WHERE `name` LIKE 'license\_%' ``` #### 15. Vérifier la table des bandeaux masqués Source : `App/Library/License/LicenseManager.php:585`. Avant 0.32 ms ; après 0.31 ms. ```sql SELECT COUNT(*) AS cpt FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name = 'user_notice_dismissal' ``` #### 16. Lire le masquage du bandeau de licence Source : `App/Library/License/LicenseBannerDismissal.php:60`. Avant 0.18 ms ; après 0.22 ms. ```sql SELECT `dismissed_until` FROM `user_notice_dismissal` WHERE `id_user_main` = :user_id AND `notice_key` = 'license_banner' LIMIT 1 ```