- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@Kushal_2612 The slowness you are seeing is generally when an external service submits queries against standard workspace compute or interactive clusters, which carry heavy execution overhead. For querying Unity Catalog Delta tables from an external agent, you can point the agent at a Databricks SQL Warehouse using either the SQL Statement Execution API (/api/2.0/sql/statements) or drivers. SQL Warehouses are purpose-built for low-latency BI and transactional application queries, providing Photon-accelerated execution, serverless auto-scaling in seconds and intelligent query result caching. For a text-to-SQL pipeline where the agent translates user input into SQL and fetches the data, the Statement Execution API handles async execution, result pagination and caching out of the box making it far more efficient than generic workspace API calls.
- Serverless SQL Warehouses - It removes cluster spin up delays keeping startup latency to a few seconds if idle.
- Query Result Caching - Ensure result caching is active on your warehouse so identical or similar queries return instantly from memory.
- Enable Predictive I/O - Turn on Predictive I/O for the frequently accessed curated Delta tables to accelerate table scans and filter operations.