ChangeMessageAccess: Add index for byPathSet method.
When using a sql datastore, ChangeMessageAccess#byPathSet ends
up creating a request filtering results with columns patchset_change_id
and patchset_patch_set_id, none of which is indexed. This results
in a full table scan.
Since change I6bc6391f456d9faeab7f1212b9c0463e7514cc05, change messages
are retrieved by patch set for highlighting purpose in ListChanges.
This can have a significant impact on dashboard. On a gerrit instance
I manage, which has about 70,000 lines in change_messages, one user
dashboard with 137 displayed changes went from an average display
time of 2.4s to 0.7s by adding this index.
Change-Id: If92f5b4f924617c69a1318f31a5ca01f320af792
4 files changed