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 table_id index to oc_tables_columns #1078

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

grnd-alt
Copy link
Member

@grnd-alt grnd-alt commented May 8, 2024

No description provided.

@grnd-alt grnd-alt linked an issue May 8, 2024 that may be closed by this pull request
6 tasks
@juliushaertl
Copy link
Member

One thing I missed when discussing this earlier, we should still add the indices to the existing migration files where the tables are created. That way the index is immediately there on new installations.

@grnd-alt grnd-alt force-pushed the perf/add-table-id-index branch 2 times, most recently from 991fe38 to 3794252 Compare May 8, 2024 13:07
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
@@ -59,6 +59,8 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
'notnull' => false,
]);
$table->setPrimaryKey(['id']);

$table->addIndex(["ownership"]);
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to also pass the index name as the second parameter

@enjeck
Copy link
Contributor

enjeck commented May 10, 2024

@grnd-alt @juliushaertl Why are we adding an index?

@juliushaertl
Copy link
Member

To improve the performance of database queries that use those columns to filter for entries.

Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
@grnd-alt grnd-alt marked this pull request as ready for review May 13, 2024 14:08
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.

Analyze queries and look for missing indices
3 participants