Story discovery engine for the Counterdata Network. Grabs relevant stories from various APIs, runs them against bespoke classifier models, post results to a central server.
Apache License 2.0
0
stars
2
forks
source link
perf(alembic): add new alembic migration for updated indexes #43
This commit contains new revision 'upgrade_composite_index' in the alembic migration scripts
Changes
The changes in this commit involve adding new composite indexes to enhance performance of Key Dashboard Queries in the Alembic migration scripts. The previous indexes were replaced with composite indexes. Specifically, the following new indexes were added:
stories_processed_date_above_threshold_true on stories for columns processed_date and above_threshold where above_threshold is true.
stories_project_model_score on stories for columns project_id and model_score.
stories_project_posted_date on stories for columns project_id and posted_date.
stories_source_processed_date on stories for columns processed_date and source.
stories_source_published_date on stories for columns published_date and source.
Merge requirement checklist
Migration Validation: Confirm that the migration works as expected and doesn't cause any issues in the database.
This commit contains new revision 'upgrade_composite_index' in the alembic migration scripts
Changes
The changes in this commit involve adding new composite indexes to enhance performance of Key Dashboard Queries in the Alembic migration scripts. The previous indexes were replaced with composite indexes. Specifically, the following new indexes were added:
stories_processed_date_above_threshold_true
onstories
for columnsprocessed_date
andabove_threshold
whereabove_threshold
istrue
.stories_project_model_score
onstories
for columnsproject_id
andmodel_score
.stories_project_posted_date
onstories
for columnsproject_id
andposted_date
.stories_source_processed_date
onstories
for columnsprocessed_date
andsource
.stories_source_published_date
onstories
for columnspublished_date
andsource
.Merge requirement checklist
Migration Validation: Confirm that the migration works as expected and doesn't cause any issues in the database.
Note : This potentially fixes speed up key queries against story-processor db issue in our Dashboard Repository