{"id":15704102,"url":"https://github.com/macbre/query-digest","last_synced_at":"2025-05-12T16:33:00.875Z","repository":{"id":141988061,"uuid":"94119091","full_name":"macbre/query-digest","owner":"macbre","description":"A dynamic code analysis tool that processes SQL queries logs and data flow information","archived":false,"fork":false,"pushed_at":"2018-12-09T17:48:01.000Z","size":99,"stargazers_count":7,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T00:38:33.057Z","etag":null,"topics":["data-flow","database","elasticsearch","mysql","performance-visualization","query","query-digest","sql","sql-logs","sus","sustainability"],"latest_commit_sha":null,"homepage":"https://medium.com/legacy-systems-diary/cross-components-data-flow-417830569e37","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macbre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-06-12T16:47:42.000Z","updated_at":"2024-04-24T19:23:18.000Z","dependencies_parsed_at":"2023-09-29T03:51:19.611Z","dependency_job_id":null,"html_url":"https://github.com/macbre/query-digest","commit_stats":{"total_commits":109,"total_committers":2,"mean_commits":54.5,"dds":0.01834862385321101,"last_synced_commit":"02975b18cfe82b298f4c229a31c96fb470d0887f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fquery-digest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fquery-digest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fquery-digest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macbre%2Fquery-digest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macbre","download_url":"https://codeload.github.com/macbre/query-digest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253777149,"owners_count":21962635,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-flow","database","elasticsearch","mysql","performance-visualization","query","query-digest","sql","sql-logs","sus","sustainability"],"created_at":"2024-10-03T20:10:21.268Z","updated_at":"2025-05-12T16:33:00.833Z","avatar_url":"https://github.com/macbre.png","language":"Python","readme":"query-digest [![Build Status](https://travis-ci.org/macbre/query-digest.svg?branch=master)](https://travis-ci.org/macbre/query-digest)\n============\n\nThis is a **dynamic code analysis tool** that processes last hour of **SQL queries logs generated by MediaWiki and Perl backend scripts** in SJC prod environment, **SQL queries made by a given Pandora service** and reports\nthose made by given feature (use `--path` option) or involving given table (use `--table` option).\n\nYou can provide a **raw SQL log file** via `--file` option. Each line should consist a single SQL query.\n\nIt then reports the following:\n\n* the source host type (web, offline)\n* normalized query\n* method that called it\n* median query time\n* no of query calls\n* sum of query times\n* median of rows returned\n\n## Output modes\n\n* a default one will output a table with all the data above\n* `--simple` will emit a simplified view\n* `--csv` will emit CSV-formatted statistics for further processing\n* `--data-flow` will emit TSV [suitable for visualization](https://github.com/macbre/data-flow-graph) ([**an example**](https://macbre.github.io/data-flow-graph/gist.html#29e4e18743b863540ada31d66af80eff))\n* `--sql-log` will emit real queries SQL log [suitable as `index-digest` input](https://github.com/macbre/index-digest)\n\n## Install\n\n```bash\nsudo apt-get install python-pip virtualenv\nvirtualenv env\nsource env/bin/activate\nmake install\n```\n\n## Run it\n\n\u003e `DEBUG=1` env variable will enable debug level logging\n\n```\nquery_digest --file=/var/log/queries.log\n\nquery_digest --path=\"/extensions/wikia/Wall\"\nquery_digest --path=\"/extensions/wikia/Wall\" --csv\n\nquery_digest --table=wall_notification\nquery_digest --table=wall_notification --csv\n\nquery_digest --table=image_review --data-flow\n\nquery_digest --service=content-entity-worker\nquery_digest --service=content-entity-worker --csv\n\nquery_digest --database=statsdb --sql-log\n```\n\n## Visualizing the data flow\n\n![](https://raw.githubusercontent.com/macbre/data-flow-graph/master/docs/data-flow-example.png)\n\n`query_digest` generates TSV file that can be consumed by [`data-flow-graph`](https://github.com/macbre/data-flow-graph). Simply follow these three steps:\n\n* run `query_digest` with `--data-flow` option\n* copy generated TSV and pasted it on [Gist](https://gist.github.com/)\n* visit [`data-flow-graph` Gist viever](https://macbre.github.io/data-flow-graph/gist.html]) and paste the Gist URL\n\n\u003e Please note that TSV rows can be combined - i.e. you can have a graph of data-flow of two different features, services, databases on a single screen.\n\nHere's an [example with data flow around backend tables](https://macbre.github.io/data-flow-graph/gist.html#0e176d667f79ab1124b85e3a389c7df8)\n\n## Example output\n\n```\n2017-02-03 14:31:01 kibana                              INFO     500000 rows returned in 4599 ms\n2017-02-03 14:31:56 query_digest                        INFO     Processing 500000 queries...\n2017-02-03 14:31:58 query_digest                        INFO     Got 38 kinds of queries\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| query                                                                                                                                                                                                                                                                                                                                                                     | method                                                                                       | dbname     | source_host   |   count |      time_sum |   time_median |   rows_sum |   rows_median |\n+===========================================================================================================================================================================================================================================================================================================================================================================+==============================================================================================+============+===============+=========+===============+===============+============+===============+\n| SELECT * FROM `comments_index` WHERE comment_id = X LIMIT N                                                                                                                                                                                                                                                                                                               | CommentsIndex::selectRow                                                                     | local      | ap            |  322667 | 145401        |      0.334978 |     322582 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT min(rev_id) FROM `revision` WHERE rev_page = X LIMIT N                                                                                                                                                                                                                                                                                                             | ArticleComment::getFirstRevID                                                                | local      | ap            |   70004 |  29422.8      |      0.265837 |      70004 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `page` WHERE page_id = X LIMIT N                                                                                                                                                                                                                                                                                                                            | Title::newFromID                                                                             | local      | ap            |   22152 |   9650.71     |      0.309944 |      22047 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT N FROM `wall_related_pages` LIMIT N                                                                                                                                                                                                                                                                                                                                | DatabaseBase::tableExists                                                                    | local      | ap            |    9647 |   5778.94     |      0.279188 |       8193 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| COMMIT                                                                                                                                                                                                                                                                                                                                                                    | ExternalUser_Wikia::linkToLocal                                                              | local      | ap            |   15280 |   5283.3      |      0.228882 |       7379 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `user_properties` WHERE up_user = X                                                                                                                                                                                                                                                                                                                         | User::loadOptions                                                                            | wikicities | ap            |    8009 |   3669.72     |      0.306845 |     176211 |            16 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT props FROM `page_wikia_props` WHERE page_id = X AND propname = X                                                                                                                                                                                                                                                                                                   | wfGetWikiaPageProp                                                                           | local      | ap            |    6535 |   3654.12     |      0.335932 |       2266 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT ug_group FROM `user_groups` WHERE ug_user = X                                                                                                                                                                                                                                                                                                                      | Wikia\\Service\\User\\Permissions\\PermissionsServiceImpl::loadLocalGroups                       | local      | ap            |    8399 |   3458.95     |      0.266075 |       2989 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `wikicities_cN`.`user` WHERE user_id = X LIMIT N                                                                                                                                                                                                                                                                                                            | User::loadFromDatabase                                                                       | local      | ap            |    7642 |   3306.17     |      0.294209 |       7639 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `user` WHERE user_id = X LIMIT N                                                                                                                                                                                                                                                                                                                            | ExternalUser_Wikia::initFromCond                                                             | wikicities | ap            |    5770 |   2266.82     |      0.256062 |       5767 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT blob_text FROM `blobs` WHERE blob_id = X LIMIT N                                                                                                                                                                                                                                                                                                                   | ExternalStoreDB::fetchBlob                                                                   | blobs20141 | ap            |    2378 |   1916.49     |      0.611544 |       2378 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (User::loadFromDatabase)                                                 | local      | ap            |    5857 |   1662.11     |      0.170946 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT old_text,old_flags FROM `text` WHERE old_id = X LIMIT N                                                                                                                                                                                                                                                                                                            | Revision::loadText                                                                           | local      | ap            |    2290 |   1361.15     |      0.338078 |       2289 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (DatabaseBase::tableExists)                                              | local      | ap            |    6000 |   1259.57     |      0.144005 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| Important table write - UPDATE `page` SET page_touched = X WHERE page_id = X                                                                                                                                                                                                                                                                                              | Title::invalidateCache                                                                       | local      | ap            |    1826 |    800.683    |      0.300884 |       1825 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (Wikia\\Service\\User\\Permissions\\PermissionsServiceImpl::loadLocalGroups) | local      | ap            |    2435 |    684.73     |      0.174999 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT user_editcount FROM `wikicities_cN`.`user` WHERE user_id = X LIMIT N                                                                                                                                                                                                                                                                                               | User::edits                                                                                  | local      | ap            |    1598 |    562.134    |      0.234485 |       1597 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT user_name FROM `wikicities_cN`.`user` WHERE user_id = X LIMIT N                                                                                                                                                                                                                                                                                                    | User::whoIs                                                                                  | local      | ap            |     834 |    307.828    |      0.249505 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| INSERT INTO `wall_history` (parent_page_id,post_user_id,post_ns,post_user_ip,is_reply,comment_id,parent_comment_id,metatitle,reason,action,revision_id) VALUES (X,X,X,NULL,'XNXNXFun facts #NXThread movedXNXN')                                                                                                                                                          | DatabaseBase::insert                                                                         | local      | ap            |     236 |    258.164    |      0.57745  |        236 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| COMMIT                                                                                                                                                                                                                                                                                                                                                                    | WikiPage::doPurge                                                                            | local      | ap            |      21 |     30.3991   |      1.08814  |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (Title::newFromID)                                                       | local      | ap            |     101 |     27.3879   |      0.123978 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT page_id, count(*) as cnt FROM `wall_related_pages` WHERE comment_id = X GROUP BY page_id ORDER BY order_index                                                                                                                                                                                                                                                      | WallRelatedPages::getMessagesRelatedArticleIds                                               | local      | ap            |      59 |     23.833    |      0.316143 |         17 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `comments_index` WHERE comment_id = X LIMIT N                                                                                                                                                                                                                                                                                                               | CommentsIndex::selectRow                                                                     | local      | task          |      70 |     23.2508   |      0.306487 |         39 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT page_id,page_len,page_is_redirect,page_latest FROM `page` WHERE page_namespace = X AND page_title = X LIMIT N                                                                                                                                                                                                                                                      | LinkCache::addLinkObj                                                                        | local      | ap            |      41 |     19.6617   |      0.247955 |         41 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (DatabaseBase::insert)                                                   | local      | ap            |      53 |     11.0331   |      0.135899 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (CommentsIndex::selectRow)                                               | local      | ap            |      24 |     11.0061   |      0.157952 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `page_restrictions` WHERE pr_page = X                                                                                                                                                                                                                                                                                                                       | Title::loadRestrictions                                                                      | local      | ap            |      23 |      8.36468  |      0.31805  |         20 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT rev_id,rev_page,rev_text_id,rev_timestamp,rev_comment,rev_user_text,rev_user,rev_minor_edit,rev_deleted,rev_len,rev_parent_id,rev_shaN,page_namespace,page_title,page_id,page_latest,user_name FROM `revision` INNER JOIN `page` ON ((page_id = rev_page)) LEFT JOIN `wikicities_cN`.`user` ON ((rev_user != N) AND (user_id = rev_user)) WHERE rev_id = X LIMIT N | Revision::fetchFromConds                                                                     | local      | ap            |       8 |      7.44081  |      0.385523 |          7 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT distinct comment_id FROM comments_index WHERE parent_comment_id = X AND comment_id \u003e X ORDER BY comment_id LIMIT N                                                                                                                                                                                                                                                 | WallThread:getReplyIdsFromDB                                                                 | local      | ap            |       3 |      3.60012  |      0.788927 |         77 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (User::edits)                                                            | local      | ap            |      10 |      2.00319  |      0.215054 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (Title::invalidateCache)                                                 | local      | ap            |       8 |      1.82891  |      0.247955 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SHOW SLAVE STATUS                                                                                                                                                                                                                                                                                                                                                         | DatabaseMysqlBase::getLagFromSlaveStatus                                                     | blobs20141 | ap            |       5 |      1.31226  |      0.200987 |          5 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `page` WHERE page_id = X LIMIT N                                                                                                                                                                                                                                                                                                                            | Title::newFromID                                                                             | local      | task          |       4 |      1.11771  |      0.27144  |          4 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT * FROM `ipblocks` WHERE ipb_address = X                                                                                                                                                                                                                                                                                                                            | Block::newLoad                                                                               | local      | ap            |       2 |      0.793219 |      0.396609 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| SELECT page_id,page_namespace,page_title,page_restrictions,page_counter,page_is_redirect,page_is_new,page_random,page_touched,page_latest,page_len FROM `page` WHERE page_id = X LIMIT N                                                                                                                                                                                  | WikiPage::newFromID                                                                          | local      | ap            |       2 |      0.625134 |      0.312567 |          2 |             1 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (ExternalStoreDB::fetchBlob)                                             | blobs20132 | ap            |       3 |      0.608921 |      0.202179 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (ArticleComment::getFirstRevID)                                          | local      | ap            |       2 |      0.452995 |      0.226498 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\n| BEGIN                                                                                                                                                                                                                                                                                                                                                                     | DatabaseBase::query (ExternalUser_Wikia::initFromCond)                                       | wikicities | ap            |       2 |      0.236034 |      0.118017 |          0 |             0 |\n+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------+------------+---------------+---------+---------------+---------------+------------+---------------+\nNote: times are in [ms], queries are normalized\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fquery-digest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacbre%2Fquery-digest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacbre%2Fquery-digest/lists"}