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

Feat/index optimization and benchmarking #878

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

Conversation

saifxd7
Copy link
Contributor

@saifxd7 saifxd7 commented Nov 26, 2023

Fixes: #863
/claim #863

Optimization Process

Initial Analysis

Description: Conducted an analysis of the current indexing strategy to identify potential areas for improvement.
Tools Used: PgHero and Dexter
Findings: Identified the need to delete idx_tuples_entity and add idx_attributes_tenant_created_tx for optimization.

Index Optimization

Optimization Strategies: Implemented specific index optimizations.

  1. Deleted Index: idx_tuples_entity
  2. Added Index: idx_attributes_tenant_created_tx

Implementation Details: Executed SQL commands to delete and add indexes.

Benchmarking Setup

Environment Details

  • Postgres Version: 16
  • Operating System: Windows 11

Benchmarking Methodology

Query Tested: Checked queries from internal/engines folder.

  • Query 1:
    SELECT name, serialized_definition, version
    FROM public.schema_definitions
    WHERE name= :name AND version= :version AND tenant_id= :tenant_id'
    LIMIT 1;

Procedure: Described the benchmarking process, including the number of times each query is run and how metrics are collected.

Benchmark Results

Before Optimization

  • Query 1:
  • Average Execution Time: 0.393 ms

After Optimization

  • Query 1:
  • Average Execution Time: 0.054 ms

Analysis and Conclusions

Performance Improvements: Significant improvements in query performance were observed post-optimization.

Recommendations: Continue to monitor and analyze system performance. Consider further optimizations based on future usage patterns.

Copy link

algora-pbc bot commented Nov 26, 2023

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres Index Optimization and Benchmarking
1 participant