Back to CERN-HSF
GSoC 2026

AI-Assisted PostgreSQL Optimization Using EXPLAIN Plans

Nopayloaddb is used to serve time-sensitive conditions data for high-energy physics (HEP) experiments, so performance is critical: slow IOV lookups can delay entire reconstruction workflows. Right now, the database layer doesn’t have replicas or strong observability, even though the application already includes configuration hooks for PgBouncer and read-only database connections. In this 24-week project, I plan to improve reliability and performance by adding streaming replication, along with monitoring using Prometheus, Grafana, and Loki. I’ll also build a replica-based EXPLAIN analysis system powered by pg_stat_statements to safely study query performance. On top of that, I’ll develop a layered AI assistant (combining rules, LLMs, and parameter hints) that provides reviewed, allow-listed optimization suggestions through a simple REST API. All of this will be done without modifying existing Django schemas, and the results will be validated through benchmarking and clear documentation.

Project details

Contributor

Sarthak18

Mentors

Not available

Technologies

Not listed in the archive