Skip to content

Conversation

@tiramisuflavor
Copy link

@tiramisuflavor tiramisuflavor commented Jul 11, 2025

Hi folks!

This change ensure indexes are created in key tables making the website navigation way faster. For the most part, all queries were doing full table scans and it takes seconds for every pane to load up. After applying these indexes, navigation is smooth.

The main sources of information to find which indexes are necessary were the stats.py and episodes.py files.

If there's a better way to ensure these indexes are created, feel free to correct it.

Thanks!

@tiramisuflavor tiramisuflavor changed the title Add history indexes Improve website performance with db indexes Jul 11, 2025
Copy link
Collaborator

@anderson-oki anderson-oki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i would move this to alembic migrations instead, what do you think @morpheus65535? We would need to test on both sqlite and postgres too.

@morpheus65535
Copy link
Owner

I think i would move this to alembic migrations instead, what do you think @morpheus65535? We would need to test on both sqlite and postgres too.

Yes definitely and I would make sure that indexes are properly created both in SQLite and Postgres.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants