Removed unnecessary count; added index on submit_time
ClosedPublic

Authored by jskladan on Nov 3 2015, 12:11 PM.

Details

Summary

As mentionted in T613, the ResulsDB is painfully slow when showing results,
because we call q.count() for each query to be able to compute total number
of results meeting the query criteria.
This is unnecessary, thus removing it.

As we also sort all the data by submit_time, it is worth having the column
indexed

Test Plan

none

Diff Detail

Repository
rRSDB resultsdb
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jskladan retitled this revision from to Removed unnecessary count; added index on submit_time.Nov 3 2015, 12:11 PM
jskladan updated this object.
jskladan edited the test plan for this revision. (Show Details)
jskladan added reviewers: tflink, mkrizek.
tflink accepted this revision.Nov 3 2015, 2:20 PM
This revision is now accepted and ready to land.Nov 3 2015, 2:20 PM
mkrizek accepted this revision.Nov 3 2015, 2:32 PM
Closed by commit rRSDBe120940631e5: Removed unnecessary count; index on submit_time (authored by Josef Skladanka <jskladan@redhat.com>). · Explain WhyNov 4 2015, 9:16 AM
This revision was automatically updated to reflect the committed changes.