{"action":"created","issue":{"url":"https://api.github.com/repos/pingcap/tidb/issues/7889","repository_url":"https://api.github.com/repos/pingcap/tidb","labels_url":"https://api.github.com/repos/pingcap/tidb/issues/7889/labels{/name}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/7889/comments","events_url":"https://api.github.com/repos/pingcap/tidb/issues/7889/events","html_url":"https://github.com/pingcap/tidb/issues/7889","id":369773182,"node_id":"MDU6SXNzdWUzNjk3NzMxODI=","number":7889,"title":"The query is too slow，How to optimize performance？","user":{"login":"Lyle-liang","id":14850448,"node_id":"MDQ6VXNlcjE0ODUwNDQ4","avatar_url":"https://avatars2.githubusercontent.com/u/14850448?v=4","gravatar_id":"","url":"https://api.github.com/users/Lyle-liang","html_url":"https://github.com/Lyle-liang","followers_url":"https://api.github.com/users/Lyle-liang/followers","following_url":"https://api.github.com/users/Lyle-liang/following{/other_user}","gists_url":"https://api.github.com/users/Lyle-liang/gists{/gist_id}","starred_url":"https://api.github.com/users/Lyle-liang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lyle-liang/subscriptions","organizations_url":"https://api.github.com/users/Lyle-liang/orgs","repos_url":"https://api.github.com/users/Lyle-liang/repos","events_url":"https://api.github.com/users/Lyle-liang/events{/privacy}","received_events_url":"https://api.github.com/users/Lyle-liang/received_events","type":"User","site_admin":false},"labels":[{"id":256872091,"node_id":"MDU6TGFiZWwyNTY4NzIwOTE=","url":"https://api.github.com/repos/pingcap/tidb/labels/question","name":"question","color":"fbca04","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-13T06:34:27Z","updated_at":"2018-10-14T03:00:58Z","closed_at":null,"author_association":"NONE","body":"![image](https://user-images.githubusercontent.com/14850448/46902165-04efcf80-cef3-11e8-8e89-8b3d2351dab0.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/14850448/46902142-724f3080-cef2-11e8-8b14-68de34801836.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/14850448/46902280-281b7e80-cef5-11e8-856b-3cbe40c365d7.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pingcap/tidb/issues/comments/429592414","html_url":"https://github.com/pingcap/tidb/issues/7889#issuecomment-429592414","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/7889","id":429592414,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTU5MjQxNA==","user":{"login":"jackysp","id":4352397,"node_id":"MDQ6VXNlcjQzNTIzOTc=","avatar_url":"https://avatars1.githubusercontent.com/u/4352397?v=4","gravatar_id":"","url":"https://api.github.com/users/jackysp","html_url":"https://github.com/jackysp","followers_url":"https://api.github.com/users/jackysp/followers","following_url":"https://api.github.com/users/jackysp/following{/other_user}","gists_url":"https://api.github.com/users/jackysp/gists{/gist_id}","starred_url":"https://api.github.com/users/jackysp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackysp/subscriptions","organizations_url":"https://api.github.com/users/jackysp/orgs","repos_url":"https://api.github.com/users/jackysp/repos","events_url":"https://api.github.com/users/jackysp/events{/privacy}","received_events_url":"https://api.github.com/users/jackysp/received_events","type":"User","site_admin":false},"created_at":"2018-10-14T03:00:58Z","updated_at":"2018-10-14T03:00:58Z","author_association":"MEMBER","body":"It's glad to see more details of your workload, @Lyle-liang ! \r\nCould you provide us the following information to help to locate why the SQL runs slow:\r\n\r\n- the execution plan of this SQL in TiDB\r\n```sql\r\nexplain format=\"dot\" select ...\r\nexplain select ...\r\n```\r\n\r\n- TiDB version and the exact git commit hash value.\r\n```sql\r\nselect tidb_version()\\G\r\n```\r\n\r\n- the `create table` statement for the involved tables\r\n```sql\r\nshow create table ${involved_table_1}\\G\r\nshow create table ${involved_table_2}\\G\r\n...\r\n```\r\n\r\n- the statistics data of the involved tables\r\n```sh\r\ncurl -G \"http://${tidb-server-ip}:${tidb-server-status-port}/stats/dump/${db_name}/${table_name}\" > ${table_name}_stats.json\r\n```\r\n\r\n- is the query always slow, or just occasionally"}}
{"actor":{"display_login":"jackysp"}}