data_pulse
Contributor III

@Kushal_2612 

Since you are already using Databricks API and seeing high latency, Check the below once as it needs to be validated for API/ Compute Latency.

  • Is the SQL warehouse already running, or is each request waiting for compute startup?
  • How long does the generated SQL query itself take when run directly in Databricks?
  • Is the API call asynchronous and spending time polling for completion?
  • Is the AI agent itself taking most of the time to generate SQL / process the result?

So first benchmark the same query directly against a Serverless SQL Warehouse. If that is fast but the current API flow is slow, then the bottleneck is likely the API/agent orchestration rather than the Delta table itself.

If your agent already generates SQL, a Serverless SQL Warehouse + Databricks SQL Connector is worth testing instead of repeatedly using REST/polling. Can check the reference.

If the intent is really natural language based analytics, then Genie Agent is a better fit because Databricks handles the NL to SQL layer seamlessly.