{"id":7745,"date":"2019-08-23T16:06:45","date_gmt":"2019-08-23T15:06:45","guid":{"rendered":"https:\/\/blog.capdata.fr\/?p=7745"},"modified":"2019-09-13T10:33:46","modified_gmt":"2019-09-13T09:33:46","slug":"faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema","status":"publish","type":"post","link":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/","title":{"rendered":"Faciliter la lecture des mesures de temps dans performance_schema"},"content":{"rendered":"<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F7745&#038;text=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F7745&#038;title=Faciliter%20la%20lecture%20des%20mesures%20de%20temps%20dans%20performance_schema\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Faciliter%20la%20lecture%20des%20mesures%20de%20temps%20dans%20performance_schema&#038;body=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20:%20https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F7745\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a><p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/Chrono.png\" alt=\"\" width=\"960\" height=\"305\" class=\"aligncenter size-full wp-image-7747\" srcset=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/Chrono.png 960w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/Chrono-300x95.png 300w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/Chrono-768x244.png 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>Admettons que nous devions remonter pour une base mysql donn\u00e9e le top 10 des tables les plus acc\u00e9d\u00e9es en lecture par temps d&#8217;acc\u00e8s. On pourrait utiliser <i>P_S.table_io_waits_summary_by_table<\/i> par exemple :<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nmysql&gt; select OBJECT_NAME, INDEX_NAME, COUNT_READ, AVG_TIMER_READ\r\n    -&gt; from performance_schema.table_io_waits_summary_by_index_usage\r\n    -&gt; where OBJECT_SCHEMA='mabase'\r\n    -&gt; order by AVG_TIMER_READ desc limit 10 ;\r\n+---------------+------------+------------+----------------+\r\n| OBJECT_NAME   | INDEX_NAME | COUNT_READ | AVG_TIMER_READ |\r\n+---------------+------------+------------+----------------+\r\n| t_1           | idx3       |          1 |       70377507 |\r\n| t_1           | PRIMARY    |          6 |       20655678 |\r\n| t_2           | PRIMARY    |         10 |        3984852 |\r\n| t_2           | idx3       |         76 |        2099178 |\r\n| t_3           | NULL       |        156 |         894048 |\r\n| t_4           | PRIMARY    |      92726 |         525003 |\r\n| t_3           | idx2       |          0 |              0 |\r\n| t_3           | idx4       |          0 |              0 |\r\n| t_3           | idx5       |          0 |              0 |\r\n| t_1           | idx2       |          0 |              0 |\r\n+---------------+------------+------------+----------------+\r\n10 rows in set (1.07 sec)\r\n<\/pre>\n<p>Bon c&#8217;est bien gentil mais on ne sait pas \u00e0 priori quelle sera l&#8217;unit\u00e9 utilis\u00e9e pour exprimer cette valeur de AVG_TIMER_READ. Sont-ce des microsecondes, des nanosecondes &#8230; La <a href=\"https:\/\/dev.mysql.com\/doc\/mysql-perfschema-excerpt\/5.6\/en\/table-io-waits-summary-by-table-table.html\">documentation <\/a>sur la vue ne le dit pas. <\/p>\n<h2>La gestion des timers dans performance_schema<\/h2>\n<p>Ce pourra faire l&#8217;objet d&#8217;un autre post, mais pour simplifier on peut dire que les vues dans performance_schema ob\u00e9issent \u00e0 une hi\u00e9rarchie bas\u00e9e sur des <i>instruments<\/i> et des <i>consumers<\/i>. <\/p>\n<p>Globalement, les <i>instruments<\/i> sont les \u00e9v\u00e8nements que l&#8217;on veut tracer, et les <i>consumers<\/i> les destinations de trace. Si on veut faire l&#8217;analogie avec les Extended Events de SQL Server, on peut dire que les <i>instruments<\/i> sont les events et les <i>consumers<\/i> les targets. Sauf que pour MySQL, les destinations sont toutes des vues. <\/p>\n<p>Les classes principales ci-dessous transaction, statement, stage, wait et idle sont associ\u00e9es \u00e0 de la mesure de temps :<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/p_s1.png\" alt=\"\" width=\"906\" height=\"266\" class=\"aligncenter size-full wp-image-7750\" srcset=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/p_s1.png 906w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/p_s1-300x88.png 300w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/p_s1-768x225.png 768w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><br \/>\n&#8211; <i>Statement<\/i> est une requ\u00eate unitaire, faisant partie d&#8217;une transaction.<br \/>\n&#8211; <i>Stage<\/i> repr\u00e9sente chaque \u00e9tape lors de l&#8217;ex\u00e9cution d&#8217;un <i>statement<\/i>: parsing, ouverture de la table, etc&#8230; Tout le monde conna\u00eet l&#8217;infame <i>Copying to tmp table<\/i>, et bien c&#8217;est un <i>stage<\/i>.<br \/>\n&#8211; <i>Wait<\/i> regroupe tous les postes d&#8217;attente : les IO sur les fichiers de table IBD, les fichiers MyISAM, les redologs, les datafiles InnoDB, etc&#8230;<br \/>\nSi bien que ces 3 classes sont imbriqu\u00e9es les unes dans les autres, avec la classe transaction qui est la classe la plus haute dans la hi\u00e9rarchie:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/P_S2.png\" alt=\"\" width=\"864\" height=\"246\" class=\"aligncenter size-full wp-image-7752\" srcset=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/P_S2.png 864w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/P_S2-300x85.png 300w, https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/P_S2-768x219.png 768w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><br \/>\nTout \u00e7a pour dire que nos classes principales ont un besoin de mesurer le temps avec une granularit\u00e9 diff\u00e9rente selon l&#8217;ordre de grandeur de ce que l&#8217;on mesure: l&#8217;ordre de mesure de l&#8217;ex\u00e9cution d&#8217;une requ\u00eate peut se trouver entre la milliseconde et la seconde, alors que celui pour mesurer le temps d&#8217;attente sur un mutex, serait plut\u00f4t de l&#8217;ordre de la nanoseconde, voire du cycle. <\/p>\n<p>Ca tombe bien, tout \u00e7a est tr\u00e8s bien organis\u00e9, et on dispose dans P_S de tables de configuration pour nous indiquer quelle unit\u00e9 de temps est utilis\u00e9e pour quelle classe:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nmysql&gt; select * from performance_schema.setup_timers ;\r\n+-------------+-------------+\r\n| NAME        | TIMER_NAME  |\r\n+-------------+-------------+\r\n| idle        | MICROSECOND |\r\n| wait        | CYCLE       |\r\n| stage       | NANOSECOND  |\r\n| statement   | NANOSECOND  |\r\n| transaction | NANOSECOND  |\r\n+-------------+-------------+\r\n<\/pre>\n<h2>Sys pour se simplifier la vie<\/h2>\n<p>Le probl\u00e8me c&#8217;est que la vue que l&#8217;on utilise (<i>table_io_waits_summary_by_index_usage<\/i>) ne fait pas partie de la hi\u00e9rarchie classique stage \/ statement \/ wait, donc on n&#8217;est pas plus avanc\u00e9. <\/p>\n<p>Or depuis la version 5.7.7, le tr\u00e8s bon <a href=\"http:\/\/www.markleith.co.uk\/\">Mark Leith <\/a> d&#8217;Oracle nous a gratifi\u00e9 du sch\u00e9ma <a href=\"https:\/\/dev.mysql.com\/doc\/refman\/5.7\/en\/sys-schema-usage.html\">sys <\/a>qui doit simplifier les arcanes compliqu\u00e9es de P_S et en acc\u00e9l\u00e9rer l&#8217;adoption. <\/p>\n<p>En fouillant un peu dans le code des vues, on retrouve une invocation \u00e0 une fonction <i>format_time()<\/i> appliqu\u00e9e aux colonnes de temps de <i>table_io_waits_summary_by_table<\/i>, par exemple dans la d\u00e9finition de <i>sys.schema_table_statistics<\/i> : <\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nmysql&gt; show create table schema_table_statistics \\G\r\n*************************** 1. row ***************************\r\n                View: schema_table_statistics\r\n         Create View: CREATE algorithm=temptable definer=`mysql.sys`@`localhost` SQL security invoker view `schema_table_statistics`\r\nAS \r\n  SELECT    `pst`.`object_schema`                                    AS `table_schema`, \r\n            `pst`.`object_name`                                      AS `table_name`, \r\n            `sys`.`format_time`(`pst`.`sum_timer_wait`)              AS `total_latency`, \r\n            `pst`.`count_fetch`                                      AS `rows_fetched`, \r\n            `sys`.`format_time`(`pst`.`sum_timer_fetch`)             AS `fetch_latency`, \r\n            `pst`.`count_insert`                                     AS `rows_inserted`, \r\n            `sys`.`format_time`(`pst`.`sum_timer_insert`)            AS `insert_latency`, \r\n            `pst`.`count_update`                                     AS `rows_updated`, \r\n            `sys`.`format_time`(`pst`.`sum_timer_update`)            AS `update_latency`, \r\n            `pst`.`count_delete`                                     AS `rows_deleted`, \r\n            `sys`.`format_time`(`pst`.`sum_timer_delete`)            AS `delete_latency`, \r\n            `fsbi`.`count_read`                                      AS `io_read_requests`, \r\n            `sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_read`)  AS `io_read`, \r\n            `sys`.`format_time`(`fsbi`.`sum_timer_read`)             AS `io_read_latency`, \r\n            `fsbi`.`count_write`                                     AS `io_write_requests`, \r\n            `sys`.`format_bytes`(`fsbi`.`sum_number_of_bytes_write`) AS `io_write`, \r\n            `sys`.`format_time`(`fsbi`.`sum_timer_write`)            AS `io_write_latency`, \r\n            `fsbi`.`count_misc`                                      AS `io_misc_requests`, \r\n            `sys`.`format_time`(`fsbi`.`sum_timer_misc`)             AS `io_misc_latency` \r\n  FROM      (`performance_schema`.`table_io_waits_summary_by_table` `pst` \r\n            LEFT JOIN `sys`.`x$ps_schema_table_statistics_io` `fsbi` \r\n            ON       ((( `pst`.`object_schema` = `fsbi`.`table_schema`) \r\n            AND       ( `pst`.`object_name` = `fsbi`.`table_name`)))) \r\n  ORDER BY  `pst`.`sum_timer_wait` DESC\r\ncharacter_set_client: utf8\r\ncollation_connection: utf8_general_ci\r\n1 row in set (0.00 sec)\r\n<\/pre>\n<p>Voyons un peu la d\u00e9finition de cette fonction <i>format_time()<\/i> :<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nmysql&gt; select ROUTINE_NAME, ROUTINE_BODY, ROUTINE_DEFINITION\r\n    -&gt; from information_schema.routines\r\n    -&gt; where routine_schema='sys' and ROUTINE_NAME='format_time' \\G\r\n*************************** 1. row ***************************\r\n      ROUTINE_NAME: format_time\r\n      ROUTINE_BODY: SQL\r\nROUTINE_DEFINITION: \r\nBEGIN \r\n  IF picoseconds IS NULL THEN \r\n    RETURN NULL; \r\n  ELSEIF picoseconds &gt;= 604800000000000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 604800000000000000, 2), ' w'); \r\n  ELSEIF picoseconds &gt;= 86400000000000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 86400000000000000, 2), ' d'); \r\n  ELSEIF picoseconds &gt;= 3600000000000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 3600000000000000, 2), ' h'); \r\n  ELSEIF picoseconds &gt;= 60000000000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 60000000000000, 2), ' m'); \r\n  ELSEIF picoseconds &gt;= 1000000000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 1000000000000, 2), ' s'); \r\n  ELSEIF picoseconds &gt;= 1000000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 1000000000, 2), ' ms'); \r\n  ELSEIF picoseconds &gt;= 1000000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 1000000, 2), ' us'); \r\n  ELSEIF picoseconds &gt;= 1000 THEN \r\n    RETURN CONCAT(Round(picoseconds \/ 1000, 2), ' ns'); \r\n  ELSE \r\n    RETURN CONCAT(picoseconds, ' ps'); \r\n  END IF; \r\nEND \r\n1 row in set (0.03 sec)\r\n<\/pre>\n<p>la fonction part du principe qu&#8217;on lui passe des picosecondes. On en d\u00e9duit donc que le temps hors &#8216;timers&#8217; sera exprim\u00e9 dans la mesure la plus petite, soit des picosecondes. <\/p>\n<p>D&#8217;ailleurs, si vous \u00eates en 5.7.7 minimum, et que vous souhaitez r\u00e9soudre simplement cette question de mesure, vous pouvez utiliser la fonction directement sur les vues de P_S:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nmysql&gt; select OBJECT_NAME, INDEX_NAME, COUNT_READ, sys.format_time(AVG_TIMER_READ)\r\n    -&gt; from performance_schema.table_io_waits_summary_by_index_usage\r\n    -&gt;  where OBJECT_SCHEMA='mabase'\r\n    -&gt; order by AVG_TIMER_READ desc limit 10 ;\r\n+-------------------+-------------------+------------+---------------------------------+\r\n| OBJECT_NAME       | INDEX_NAME        | COUNT_READ | sys.format_time(AVG_TIMER_READ) |\r\n+-------------------+-------------------+------------+---------------------------------+\r\n| t_1               | idx3              |         88 | 33.52 us                        |\r\n| t_1               | PRIMARY           |        180 | 26.55 us                        |\r\n| t_2               | PRIMARY           |         49 | 25.95 us                        |\r\n| t_2               | idx3              |         26 | 23.71 us                        |\r\n| t_3               | NULL              |         94 | 21.76 us                        |\r\n| t_4               | PRIMARY           |          1 | 21.21 us                        |\r\n| t_3               | idx2              |          1 | 19.58 us                        |\r\n| t_3               | idx4              |          1 | 18.83 us                        |\r\n| t_3               | idx5              |         18 | 15.86 us                        |\r\n| t_1               | idx2              |          1 | 14.91 us                        |\r\n+-------------------+-------------------+------------+---------------------------------+\r\n10 rows in set (1.34 sec)\r\n<\/pre>\n<p>Et c&#8217;est tout pour aujourd&#8217;hui, bon weekend \u00e0 toutes et tous et \u00e0 bient\u00f4t !<br \/>\n~David.<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F7745&#038;text=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F7745&#038;title=Faciliter%20la%20lecture%20des%20mesures%20de%20temps%20dans%20performance_schema\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Faciliter%20la%20lecture%20des%20mesures%20de%20temps%20dans%20performance_schema&#038;body=Article%20sur%20le%20blog%20de%20la%20Capdata%20Tech%20Team%20%3A%20:%20https%3A%2F%2Fblog.capdata.fr%2Findex.php%2Fwp-json%2Fwp%2Fv2%2Fposts%2F7745\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/blog.capdata.fr\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>Admettons que nous devions remonter pour une base mysql donn\u00e9e le top 10 des tables les plus acc\u00e9d\u00e9es en lecture par temps d&#8217;acc\u00e8s. On pourrait utiliser P_S.table_io_waits_summary_by_table par exemple : Bon c&#8217;est bien gentil mais on ne sait pas \u00e0&hellip; <a href=\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\" class=\"more-link\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":7747,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[324,325],"class_list":["post-7745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-monitoring","tag-performance_schema"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Faciliter la lecture des mesures de temps dans performance_schema - Capdata TECH BLOG<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Faciliter la lecture des mesures de temps dans performance_schema - Capdata TECH BLOG\" \/>\n<meta property=\"og:description\" content=\"Admettons que nous devions remonter pour une base mysql donn\u00e9e le top 10 des tables les plus acc\u00e9d\u00e9es en lecture par temps d&#8217;acc\u00e8s. On pourrait utiliser P_S.table_io_waits_summary_by_table par exemple : Bon c&#8217;est bien gentil mais on ne sait pas \u00e0&hellip; Continuer la lecture &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\" \/>\n<meta property=\"og:site_name\" content=\"Capdata TECH BLOG\" \/>\n<meta property=\"article:published_time\" content=\"2019-08-23T15:06:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-13T09:33:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/Chrono.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"305\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"David Baffaleuf\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Baffaleuf\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\"},\"author\":{\"name\":\"David Baffaleuf\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf\"},\"headline\":\"Faciliter la lecture des mesures de temps dans performance_schema\",\"datePublished\":\"2019-08-23T15:06:45+00:00\",\"dateModified\":\"2019-09-13T09:33:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\"},\"wordCount\":1205,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.capdata.fr\/#organization\"},\"keywords\":[\"monitoring\",\"performance_schema\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\",\"url\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\",\"name\":\"Faciliter la lecture des mesures de temps dans performance_schema - Capdata TECH BLOG\",\"isPartOf\":{\"@id\":\"https:\/\/blog.capdata.fr\/#website\"},\"datePublished\":\"2019-08-23T15:06:45+00:00\",\"dateModified\":\"2019-09-13T09:33:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/blog.capdata.fr\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Faciliter la lecture des mesures de temps dans performance_schema\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.capdata.fr\/#website\",\"url\":\"https:\/\/blog.capdata.fr\/\",\"name\":\"Capdata TECH BLOG\",\"description\":\"Le blog technique sur les bases de donn\u00e9es de CAP DATA Consulting\",\"publisher\":{\"@id\":\"https:\/\/blog.capdata.fr\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.capdata.fr\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/blog.capdata.fr\/#organization\",\"name\":\"Capdata TECH BLOG\",\"url\":\"https:\/\/blog.capdata.fr\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp\",\"contentUrl\":\"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp\",\"width\":800,\"height\":254,\"caption\":\"Capdata TECH BLOG\"},\"image\":{\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/cap-data-consulting\/mycompany\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf\",\"name\":\"David Baffaleuf\",\"sameAs\":[\"http:\/\/www.capdata.fr\"],\"url\":\"https:\/\/blog.capdata.fr\/index.php\/author\/dbaffaleuf\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Faciliter la lecture des mesures de temps dans performance_schema - Capdata TECH BLOG","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/","og_locale":"fr_FR","og_type":"article","og_title":"Faciliter la lecture des mesures de temps dans performance_schema - Capdata TECH BLOG","og_description":"Admettons que nous devions remonter pour une base mysql donn\u00e9e le top 10 des tables les plus acc\u00e9d\u00e9es en lecture par temps d&#8217;acc\u00e8s. On pourrait utiliser P_S.table_io_waits_summary_by_table par exemple : Bon c&#8217;est bien gentil mais on ne sait pas \u00e0&hellip; Continuer la lecture &rarr;","og_url":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/","og_site_name":"Capdata TECH BLOG","article_published_time":"2019-08-23T15:06:45+00:00","article_modified_time":"2019-09-13T09:33:46+00:00","og_image":[{"width":960,"height":305,"url":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2019\/08\/Chrono.png","type":"image\/png"}],"author":"David Baffaleuf","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"David Baffaleuf","Dur\u00e9e de lecture estim\u00e9e":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#article","isPartOf":{"@id":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/"},"author":{"name":"David Baffaleuf","@id":"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf"},"headline":"Faciliter la lecture des mesures de temps dans performance_schema","datePublished":"2019-08-23T15:06:45+00:00","dateModified":"2019-09-13T09:33:46+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/"},"wordCount":1205,"commentCount":0,"publisher":{"@id":"https:\/\/blog.capdata.fr\/#organization"},"keywords":["monitoring","performance_schema"],"articleSection":["MySQL"],"inLanguage":"fr-FR","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/","url":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/","name":"Faciliter la lecture des mesures de temps dans performance_schema - Capdata TECH BLOG","isPartOf":{"@id":"https:\/\/blog.capdata.fr\/#website"},"datePublished":"2019-08-23T15:06:45+00:00","dateModified":"2019-09-13T09:33:46+00:00","breadcrumb":{"@id":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.capdata.fr\/index.php\/faciliter-la-lecture-des-mesures-de-temps-dans-performance_schema\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/blog.capdata.fr\/"},{"@type":"ListItem","position":2,"name":"Faciliter la lecture des mesures de temps dans performance_schema"}]},{"@type":"WebSite","@id":"https:\/\/blog.capdata.fr\/#website","url":"https:\/\/blog.capdata.fr\/","name":"Capdata TECH BLOG","description":"Le blog technique sur les bases de donn\u00e9es de CAP DATA Consulting","publisher":{"@id":"https:\/\/blog.capdata.fr\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.capdata.fr\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/blog.capdata.fr\/#organization","name":"Capdata TECH BLOG","url":"https:\/\/blog.capdata.fr\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/","url":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp","contentUrl":"https:\/\/blog.capdata.fr\/wp-content\/uploads\/2023\/01\/logo_capdata.webp","width":800,"height":254,"caption":"Capdata TECH BLOG"},"image":{"@id":"https:\/\/blog.capdata.fr\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/cap-data-consulting\/mycompany\/"]},{"@type":"Person","@id":"https:\/\/blog.capdata.fr\/#\/schema\/person\/136297da9f61d6e4878abe0f48bc5fbf","name":"David Baffaleuf","sameAs":["http:\/\/www.capdata.fr"],"url":"https:\/\/blog.capdata.fr\/index.php\/author\/dbaffaleuf\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/7745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/comments?post=7745"}],"version-history":[{"count":8,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/7745\/revisions"}],"predecessor-version":[{"id":7756,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/posts\/7745\/revisions\/7756"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/media\/7747"}],"wp:attachment":[{"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/media?parent=7745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/categories?post=7745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capdata.fr\/index.php\/wp-json\/wp\/v2\/tags?post=7745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}