Skip to content

Add indexes to documents_questions table for improved query performance#247

Open
vswamidass-sfdc wants to merge 2 commits intomainfrom
indexes
Open

Add indexes to documents_questions table for improved query performance#247
vswamidass-sfdc wants to merge 2 commits intomainfrom
indexes

Conversation

@vswamidass-sfdc
Copy link
Collaborator

  • Added composite indexes on the documents_questions table for the columns document_id and question_id in both orders.
  • Updated schema version to reflect the changes made by the new migration.

- Added composite indexes on the documents_questions table for the columns document_id and question_id in both orders.
- Updated schema version to reflect the changes made by the new migration.
- Updated the `set_library` method to preload associated users for improved efficiency.
- Added batch document statistics retrieval in the `show` action of `LibrariesController` to reduce query load.
- Preloaded recent documents to avoid N+1 query issues and optimized the display of document counts in the view.
- Introduced new indexes in the database to support efficient querying of document statistics.

This commit improves performance and user experience on the library show page.
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.

1 participant