Better HN
topnewbestaskshowjobs
Log inSign up

bertrandhartwig

5 karma · joined Feb 13, 2025 (1y ago) · 7 submissions

Postgres lover
Submissions

1.

Designing the Right PostgreSQL Index Using Query Plans and Statistics(beh74.github.io ↗)

1 points · by bertrandhartwig · 6mo ago · discuss

2.

Detecting PostgreSQL optimization issues with deterministic analysis(beh74.github.io ↗)

1 points · by bertrandhartwig · 6mo ago · discuss

comment 1y ago · link · parent

well my dev teams are using Flyway. So, I may not be reasoning correctly. You’re right, a copy-paste can happen quickly. I will modify the code according to your remark.

comment 1y ago · link · parent

Thank you for this advice but the tool is designed to help dev ... before to run on production.

comment 1y ago · link · parent

Thanks !

comment 1y ago · link · parent

When pgAssistant sends the prompt to the LLM, it provides the DDL of the tables involved in the query (using pg_dump), the result of the ANALYZE query, and of course, the query itself.

Believe me, LLMs understand the schema very well, and in the vast majority of cases, they suggest relevant indexes and/or query rewrites.

That being said, they are still LLMs and inherently non-deterministic.

But the goal of pgAssistant is not to fight against databases experts : it was build to help developpers before asking help to a DBA.

comment 1y ago · link · parent

I tested numerous LLM models locally with Ollama using PgAssistant. The one that gave me the best results is codestral:latest (15B).However, ChatGPT is truly a cut above the rest.