{"action":"created","issue":{"url":"https://api.github.com/repos/django-silk/silk/issues/130","repository_url":"https://api.github.com/repos/django-silk/silk","labels_url":"https://api.github.com/repos/django-silk/silk/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/django-silk/silk/issues/130/comments","events_url":"https://api.github.com/repos/django-silk/silk/issues/130/events","html_url":"https://github.com/django-silk/silk/issues/130","id":166359749,"number":130,"title":"SQL queries not ordered correctly w/ MySQL as db backend","user":{"login":"chrono","id":76803,"avatar_url":"https://avatars.githubusercontent.com/u/76803?v=3","gravatar_id":"","url":"https://api.github.com/users/chrono","html_url":"https://github.com/chrono","followers_url":"https://api.github.com/users/chrono/followers","following_url":"https://api.github.com/users/chrono/following{/other_user}","gists_url":"https://api.github.com/users/chrono/gists{/gist_id}","starred_url":"https://api.github.com/users/chrono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrono/subscriptions","organizations_url":"https://api.github.com/users/chrono/orgs","repos_url":"https://api.github.com/users/chrono/repos","events_url":"https://api.github.com/users/chrono/events{/privacy}","received_events_url":"https://api.github.com/users/chrono/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-19T15:22:43Z","updated_at":"2016-07-20T22:28:26Z","closed_at":null,"body":"In https://github.com/django-silk/silk/blob/master/silk/views/sql.py#L23 the queries are ordered by `start_time`, which on mysql is defined as `start_time datetime DEFAULT NULL`.\r\n\r\nDatetime without further specification has no microsecond precision in MySQL. As a result, the queries do not order correctly.\r\n\r\nIn our fork, I implemented [a quick hack to address this](https://github.com/tophatmonocle/silk/commit/9855ac2a0e5b27f3f277e94cf5e8fb49e7b50965) by using the auto incrementing primary key for ordering.\r\n\r\nI'm not sure what the level of MySQL support is and if this sort of change is a good idea for other platforms. Therefore not opening a PR, just opening this issue to track the bug."},"comment":{"url":"https://api.github.com/repos/django-silk/silk/issues/comments/234103548","html_url":"https://github.com/django-silk/silk/issues/130#issuecomment-234103548","issue_url":"https://api.github.com/repos/django-silk/silk/issues/130","id":234103548,"user":{"login":"avelis","id":181597,"avatar_url":"https://avatars.githubusercontent.com/u/181597?v=3","gravatar_id":"","url":"https://api.github.com/users/avelis","html_url":"https://github.com/avelis","followers_url":"https://api.github.com/users/avelis/followers","following_url":"https://api.github.com/users/avelis/following{/other_user}","gists_url":"https://api.github.com/users/avelis/gists{/gist_id}","starred_url":"https://api.github.com/users/avelis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avelis/subscriptions","organizations_url":"https://api.github.com/users/avelis/orgs","repos_url":"https://api.github.com/users/avelis/repos","events_url":"https://api.github.com/users/avelis/events{/privacy}","received_events_url":"https://api.github.com/users/avelis/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T22:28:26Z","updated_at":"2016-07-20T22:28:26Z","body":"@chrono You PostgreSQL & MySQL both seem to be the generally supported. The community around django-silk tend to use Postgres more than MySQL.\r\n\r\nYou are more than welcome to make a PR to address the start_time issue. If this could create breaking behavior then I can release it as a minor or major version."}}
{"actor":{"display_login":"avelis"}}