-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
databaseDatabase-related: SQL, AR, migrations, etcDatabase-related: SQL, AR, migrations, etcgood first issueThis issue should be suitable for less experienced developersThis issue should be suitable for less experienced developershelp offeredI would be very happy to help less experienced developers tackle this issue (advice/pairing/etc)I would be very happy to help less experienced developers tackle this issue (advice/pairing/etc)main appDEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins)DEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins)pluginDEPRECATED: split into core/features/support (was: about a plugin or the code that supports them)DEPRECATED: split into core/features/support (was: about a plugin or the code that supports them)
Description
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.
Metadata
Metadata
Assignees
Labels
databaseDatabase-related: SQL, AR, migrations, etcDatabase-related: SQL, AR, migrations, etcgood first issueThis issue should be suitable for less experienced developersThis issue should be suitable for less experienced developershelp offeredI would be very happy to help less experienced developers tackle this issue (advice/pairing/etc)I would be very happy to help less experienced developers tackle this issue (advice/pairing/etc)main appDEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins)DEPRECATED: main_app before the core plugin refactor (was: 'core' stuff that isn't in plugins)pluginDEPRECATED: split into core/features/support (was: about a plugin or the code that supports them)DEPRECATED: split into core/features/support (was: about a plugin or the code that supports them)