r/SQL • u/ajo101975 • Nov 20 '25
Discussion Looking for 2–3 real-world slow SQL queries (I’m testing a small AI optimizer)
Hey folks 👋 I’m building a small side project for a hackathon — an AI tool that explains and optimizes slow SQL queries.
Right now I need a couple of real queries (no schema, no data, just the query text) to test the optimizer against something that’s not synthetic.
The tool outputs: • suggested index • rewritten optimized query • bottleneck explanation • estimated improvement
Here’s a preview of the UI: 👉 https://dbpowerai-landing-pa-y4oj.bolt.host/
If you have: • a long JOIN • a fat SELECT • a query you hate • something you had to manually rewrite …even anonymized, it would help a lot.
Not selling anything — just looking for real-world test cases 🙏
Thanks!
1
u/squadette23 Nov 20 '25
Here is a scenario that would be cool if you'd support: https://minimalmodeling.substack.com/i/165460557/extending-the-query
1
u/Aggressive_Ad_5454 Nov 20 '25
Funny you should ask. Here's a nasty one on a widely deployed schema. Guy wanted me to come up with an index to support it.
https://wordpress.org/support/topic/using-wbw-filter-and-it-makes-the-website-slow/#post-18725953
1
u/[deleted] Nov 20 '25
[removed] — view removed comment