DBZenith — Smarter Queries. Zero Data Exposure.
Inspiration
Slow queries waste time and resources, while manual tuning is complex and testing changes directly in production is risky. We wanted to combine AI-assisted optimization with privacy protection, safe experimentation, and human control.
What it does
DBZenith analyzes PostgreSQL workload statistics and execution plans to identify bottlenecks. Its privacy gateway sanitizes query information before AI-assisted analysis. A Graph Neural Network (GNN) analyzes query-plan structures, while an RL-based optimization component with heuristic fallbacks explores optimization strategies. The platform recommends indexes and query rewrites, evaluates hypothetical indexes using HypoPG in an isolated PostgreSQL sandbox, and provides DBA approval and audit workflows before changes are applied.
How we built it
We used React, TypeScript, Vite, Python, FastAPI, PostgreSQL, and Docker Compose. PostgreSQL extensions pg_stat_statements and pg_qualstats support workload insights; SQL plan parsing, a privacy gateway, PyTorch Geometric, RL experimentation, SQL AST-based rewriting, and HypoPG power the optimization pipeline. A dashboard provides slow-query analysis, plan visualization, GNN analysis, recommendations, simulations, approvals, system health, and audit logs.
Challenges we ran into
Integrating telemetry, privacy sanitization, graph-based analysis, optimization strategies, and sandbox testing into one pipeline was challenging. We also had to account for limited simulation accuracy and ensure recommendations were reviewed rather than blindly applied.
Accomplishments that we're proud of
We connected real PostgreSQL telemetry with privacy-aware analysis, AI-assisted recommendations, GNN-based plan analysis, RL experimentation, hypothetical-index evaluation, and human approval. Our key achievement is bringing these capabilities together in one workflow instead of treating optimization, privacy, and safety as separate problems.
What we learned
We gained hands-on experience with PostgreSQL execution plans, database performance analysis, SQL parsing, FastAPI, Docker, graph neural networks, and reinforcement-learning concepts. We learned that useful optimization must balance performance, privacy, reliability, and explainability.
What's next for DBZenith
We aim to benchmark recommendations on real workloads, improve sandbox fidelity, strengthen privacy guarantees, and enhance optimization for composite indexes, partitioning, and complex queries. We also plan to improve model training and recommendation explainability.
DBZenith: Smarter optimization. Safer databases.
Built With
- artificial-intelligence
- cybersecurity
- data-privacy
- database-optimization
- database-performance
- devops
- docker
- explainable-ai
- fastapi
- graph-neural-networks
- human-in-the-loop
- hypopg
- langgraph
- postgresql
- python
- pytorch
- pytorch-geometric
- query-optimization
- react
- reinforcement-learning
- simulation
- sql
- sqlalchemy
- typescript
Log in or sign up for Devpost to join the conversation.