Postgres Index Optimization and Benchmarking
Introduction
This document outlines the process of optimizing indexes in a Postgres database and conducting before-and-after benchmarks to evaluate the performance impact of these optimizations on specific check queries.
Repository File References
- Migrations: Located in internal/storage/postgres/migrations
- Queries: Located in internal/engines
Optimization Process
Initial Analysis
- Description: Assess the current indexing strategy and identify potential areas for improvement.
- Tools Used: [List any analysis tools or scripts used]
- Findings: Summarize the key findings from the initial analysis.
Index Optimization
- Optimization Strategies: Detail the specific index optimizations implemented.
- Strategy 1: [Description]
- Strategy 2: [Description]
- ...
- Implementation Details: Provide SQL commands or scripts used for the optimization.
Benchmarking Setup
Environment Details
- Postgres Version: [Version]
- Operating System: [OS]
- Hardware Specifications: [Hardware details]
Benchmarking Methodology
- Queries Tested: List the check queries used for benchmarking, as found in the
internal/enginesfolder.- Query 1:
SQL statement - Query 2:
SQL statement - ...
- Query 1:
- Procedure: Describe the benchmarking process, including how many times each query is run and how metrics are collected.
Benchmark Results
Before Optimization
- Query 1:
- Average Execution Time: [Time]
- Additional Metrics: [Any other relevant metrics]
- Query 2:
- Average Execution Time: [Time]
- Additional Metrics: [Any other relevant metrics]
- ...
After Optimization
- Query 1:
- Average Execution Time: [Time]
- Additional Metrics: [Any other relevant metrics]
- Query 2:
- Average Execution Time: [Time]
- Additional Metrics: [Any other relevant metrics]
- ...
Analysis and Conclusions
- Performance Improvements: Highlight the key improvements in query performance post-optimization.
- Recommendations: Offer any further recommendations based on the benchmarking results.
Appendix
- Additional Notes: [Any other notes or observations]
- Scripts/Commands Used: Provide any scripts or commands used during the optimization and benchmarking process.
/bounty $400
💎 $400 bounty created by Permify
🙋 If you'd like to work on this issue, comment below to get assigned
👉 To claim this bounty, submit a pull request that includes the text /claim #863 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to Permify/permify!
if anyone want to do, I found this tool https://github.com/ankane/dexter might be helpful.
@saifxd7, I have assigned this task to you. Happy hacking 🚀
Note: The user @saifxd7 is already attempting to complete issue #863 and claim the bounty. If you attempt to complete the same issue, there is a chance that @saifxd7 will complete the issue first, and be awarded the bounty. We recommend discussing with @saifxd7 and potentially collaborating on the same solution versus creating an alternate solution.
Hi @tolgaOzen i have initially seen the issues and have made the initial analysis of the database . Should i share how i would approach for optimizing the database?
Hello @Min2who, @saifxd7 is currently dealing with the issue. You can share it with him or you can collaborate with him on the development
@saifxd7 are you still working on this ?
Yes @Min2who, I'm working on it!
Hello @saifxd7, firstly, we have reviewed your PR and changing old migration files is dangerous for those who previously used Permify and should not be done. Additionally, since we want this issue to be analyzed more thoroughly, we would like to assign one more person to elaborate on it.
Hello @Min2who, if you still want to work on this issue. I can assign it to you.
i would like to work in it.If you can assign me
@Min2who, I'm assigning you. Happy hacking 🚀
Hello @Min2who, are there any updates?
Hello @Min2who, are there any updates?
Hey @tolgaOzen was travelling for a bit. I will submit my progress in a week. Is it fine ?
Hey @tolgaOzen i have unassigned from this issue. If anyone interested can give it a try !
Hi @tolgaOzen could you please assign to me