# HG changeset patch # User Mads Kiilerich # Date 1457968666 -3600 # Node ID d36dc6617d877a563a8173ac947fe763690ae60a # Parent 0c29e737db23e1d975e856592b7817c60ce86fa1 pullrequests: add index - optimize some slow queries diff -r 0c29e737db23 -r d36dc6617d87 kallithea/model/db.py --- a/kallithea/model/db.py Mon Mar 14 16:17:46 2016 +0100 +++ b/kallithea/model/db.py Mon Mar 14 16:17:46 2016 +0100 @@ -2225,6 +2225,7 @@ Index('cs_pull_request_id_idx', 'pull_request_id'), Index('cs_changeset_comment_id_idx', 'changeset_comment_id'), Index('cs_pull_request_id_user_id_version_idx', 'pull_request_id', 'user_id', 'version'), + Index('cs_repo_id_pull_request_id_idx', 'repo_id', 'pull_request_id'), UniqueConstraint('repo_id', 'revision', 'version'), _table_args_default_dict, )