-
Notifications
You must be signed in to change notification settings - Fork 46.3k
perf(backend/db): Optimize StoreAgent and Creator views with database indexes and materialized views #10084
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
Conversation
|
This PR targets the Automatically setting the base branch to |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Here's the code health analysis summary for commits Analysis Summary
|
|
Thanks for your work on optimizing the database views! Before this can be merged, there are a few issues that need to be addressed:
The technical changes look solid - creating indexes, materialized views, and optimizing the Creator and StoreAgent views should improve query performance. I especially like the addition of the refresh function with concurrency handling. Just need the PR documentation to match the quality of the code changes. |
|
Thank you for submitting this PR with database optimizations. Before we can merge it, there are several issues that need to be addressed:
The changes themselves look like good performance improvements with:
However, we need more context about the purpose and validation of these changes before merging. |
✅ Deploy Preview for auto-gpt-docs canceled.
|
|
!deploy |
|
🚀 Deploying PR #10084 to development environment... |
|
❌ Preview Environment Deployment Failed 🚨 The preview environment deployment encountered critical errors and has been rolled back. Cleanup Completed:
Please check the workflow logs for details and try again. |
...tform/backend/migrations/20250604130249_optimise_store_agent_and_creator_views/migration.sql
Outdated
Show resolved
Hide resolved
...tform/backend/migrations/20250604130249_optimise_store_agent_and_creator_views/migration.sql
Outdated
Show resolved
Hide resolved
|
Double check this won’t break the admin pages |
...tform/backend/migrations/20250604130249_optimise_store_agent_and_creator_views/migration.sql
Show resolved
Hide resolved
|
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
# Conflicts: # autogpt_platform/backend/backend/TEST_DATA_README.md # autogpt_platform/backend/backend/check_db.py # autogpt_platform/backend/backend/check_store_data.py # autogpt_platform/backend/backend/test_data_updater.py # autogpt_platform/backend/backend/util/test_data_creator.py
|
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
|
🧹 Auto-undeploying: PR closed with active deployment. Cleaning up development environment for PR #10084. |
|
🧹 Preview Environment Cleaned Up All resources for PR #10084 have been removed:
Cleanup completed successfully. |
Summary
Performance optimization for the platform's store and creator functionality by adding targeted database indexes and implementing materialized views to reduce query execution time.
Changes 🏗️
Database Performance Optimizations:
StoreListing,StoreListingVersion,StoreListingReview,AgentGraphExecution, andProfiletablesmv_agent_run_counts,mv_review_stats) to cache expensive aggregation queriesStoreAgentandCreatorviews to use materialized views and improved query patternsKey Performance Improvements:
Checklist 📋
For code changes:
For configuration changes:
.env.exampleis updated or already compatible with my changesdocker-compose.ymlis updated or already compatible with my changesNote: No configuration changes were required as this is purely a database schema optimization.