Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more indexes to database #709

Open
denny opened this issue Nov 12, 2020 · 1 comment
Open

Add more indexes to database #709

denny opened this issue Nov 12, 2020 · 1 comment
Labels
database Database-related: SQL, AR, migrations, etc good first issue This issue should be suitable for less experienced developers help offered I would be very happy to help less experienced developers tackle this issue (advice/pairing/etc) main app DEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins) plugin DEPRECATED: split into core/features/support (was: about a plugin or the code that supports them)

Comments

@denny
Copy link
Owner

denny commented Nov 12, 2020

There are probably quite a few places where the database could benefit from having more indexes added.

As a rule of thumb, I think there should be an index on any column that is used in a scope or a utility method to filter the contents of the table down to a smaller result-set (e.g. posted_at for .recent), as well as any column that gets used for single-row lookups (e.g. slugs).

Relatedly; I think there are already indexes on all the foreign keys, but it wouldn't hurt to check and make sure - particularly for things like page->elements, group->memberships, etc.

@denny denny added good first issue This issue should be suitable for less experienced developers plugin DEPRECATED: split into core/features/support (was: about a plugin or the code that supports them) main app DEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins) help offered I would be very happy to help less experienced developers tackle this issue (advice/pairing/etc) database Database-related: SQL, AR, migrations, etc labels Nov 12, 2020
@denny
Copy link
Owner Author

denny commented Nov 12, 2020

If you are a less experienced developer who is looking at this issue and thinking you'd like to try to take it on but you're not entirely confident, I would be happy to help you - whether that's help getting set up, more explanation of what needs doing, pairing on the code task itself, or anything else I can do to help.

In my day job I'm a lead developer who often mentors less experienced developers, and I'd love to use some of that experience to help people take their first steps into contributing to open source projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Database-related: SQL, AR, migrations, etc good first issue This issue should be suitable for less experienced developers help offered I would be very happy to help less experienced developers tackle this issue (advice/pairing/etc) main app DEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins) plugin DEPRECATED: split into core/features/support (was: about a plugin or the code that supports them)
Projects
None yet
Development

No branches or pull requests

1 participant