mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Add a key to improve Diffusion's cache fill history query
Summary: Ref T10560. I don't fully understand what MySQL is doing here, but it looks like this key improves the problematic dataset in practice. (It makes sense that this key helps, I'm just not sure why the two separate keys and the UNION ALL are so bad.) This key isn't hugely expensive to add, so we can try it and see if there are still issues. Test Plan: Ran `bin/storage adjust`, saw key added to table. Used `SHOW CREATE TABLE ...` to verify the key exists. Used `EXPLAIN SELECT ...` to make sure MySQL actually uses it. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10560 Differential Revision: https://secure.phabricator.com/D15460
This commit is contained in:
parent
8858b6cf8d
commit
ca4c0db2c1
1 changed files with 3 additions and 0 deletions
|
@ -155,6 +155,9 @@ final class PhabricatorRepositorySchemaSpec
|
|||
'repositoryID' => array(
|
||||
'columns' => array('repositoryID', 'pathID', 'commitSequence'),
|
||||
),
|
||||
'key_history' => array(
|
||||
'columns' => array('commitID', 'isDirect', 'changeType'),
|
||||
),
|
||||
));
|
||||
|
||||
$this->buildRawSchema(
|
||||
|
|
Loading…
Reference in a new issue