Somewhat off topic at this point, but if you’re generating SQL using an LLM and are concerned with management of the queries generated:
- Most databases let you specify how many resources (memory, CPU, locks) a particular query gets to use, so it can’t lock out all other queries.
- If you’re using a database in production for OLTP, you probably already have timeouts for queries, and a separate analytics replica for long-running queries and OLAP.
- And if you’re really modern, you use something like Snowflake that lets you spin up an entirely separate database service (warehouse) running on the same data, so you can totally isolate your workload.