-
Notifications
You must be signed in to change notification settings - Fork 467
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
Issue 29501 optimize sql #30345
Merged
Merged
Issue 29501 optimize sql #30345
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quality Gate passedIssues Measures |
jdotcms
reviewed
Oct 15, 2024
dotCMS/src/main/java/com/dotmarketing/common/db/DotDatabaseMetaData.java
Show resolved
Hide resolved
jdotcms
reviewed
Oct 15, 2024
.../main/java/com/dotmarketing/startup/runonce/Task241014AddTemplateValueOnContentletIndex.java
Show resolved
Hide resolved
jdotcms
approved these changes
Oct 15, 2024
wezell
approved these changes
Oct 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work Erick.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes various changes to the
TemplateFactoryImpl
andTemplateSQL
classes to improve code consistency and performance. The most significant changes include the addition of a new method to check for index existence, refactoring of SQL query strings, and the introduction of a new startup task for indexing.New Features:
checkIndex
inDotDatabaseMetaData
to verify if an index exists in a table. (dotCMS/src/main/java/com/dotmarketing/common/db/DotDatabaseMetaData.java
)Code Refactoring:
TemplateFactoryImpl
to use constants fromTemplateSQL
for better maintainability. (dotCMS/src/main/java/com/dotmarketing/portlets/templates/business/TemplateFactoryImpl.java
)Performance Improvements:
Task241014AddTemplateValueOnContentletIndex
to add an index on the template value of a contentlet, significantly speeding up queries. (dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task241014AddTemplateValueOnContentletIndex.java
)TaskLocatorUtil
. (dotCMS/src/main/java/com/dotmarketing/util/TaskLocatorUtil.java
)dotCMS/src/main/resources/postgres.sql
)Bug Fixes:
CONTENTKET_INODE_TABLE_FIELD
toCONTENTLET_INODE_TABLE_FIELD
inTemplateFactoryImpl
. (dotCMS/src/main/java/com/dotmarketing/portlets/templates/business/TemplateFactoryImpl.java
)Test Updates:
MainSuite2b
to include new and existing tasks. (dotcms-integration/src/test/java/com/dotcms/MainSuite2b.java
)TemplateAPITest
to remove redundant assertions. (dotcms-integration/src/test/java/com/dotmarketing/portlets/templates/business/TemplateAPITest.java
)This PR fixes: #29501