appsembler / figures

Reporting and data retrieval app for Open edX
MIT License
44 stars 37 forks source link

Added db_index=True to LearnerCourseGradeMetrics model #224

Closed johnbaldwin closed 3 years ago

johnbaldwin commented 4 years ago

Query performance was very slow for this model. Added indexing to the fields which we use for filtering

codecov-commenter commented 4 years ago

Codecov Report

Merging #224 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #224   +/-   ##
=======================================
  Coverage   91.33%   91.33%           
=======================================
  Files          38       38           
  Lines        1950     1950           
=======================================
  Hits         1781     1781           
  Misses        169      169           
Impacted Files Coverage Δ
figures/models.py 96.98% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d96dd9b...a10587b. Read the comment docs.

johnbaldwin commented 4 years ago

@OmarIthawi Thanks for the comments. One item I forgot was running and adding the migration file. I'll inspect the SQL shell to see what indexes are already on the learner course grade metrics table and if the SO collective is right, which from reading the posts, looks that way in this case, then I'll remove those parameters

johnbaldwin commented 3 years ago

No longer need this PR. Superseded by https://github.com/appsembler/figures/pull/288