🗄️ Multi-Database Queries
Query across multiple databases simultaneously and perform cross-database joins with natural language.
Overview
Multi-Database Queries allow you to:
- Query multiple databases in a single request
- Perform joins across different databases
- Aggregate data from various sources
- Use natural language for complex cross-database operations
✨ Feature Highlight
You can now ask questions like "Show me users from MySQL and their orders from PostgreSQL" and Datix xAgents will automatically perform the cross-database join.
Supported Databases
PostgreSQL
Full support
MySQL
Full support
MongoDB
Aggregation support
SQL Server
Full support
BigQuery
Full support
Snowflake
Full support
How It Works
- Select Data Sources: Choose which databases to query in the Multi-Database Query interface
- Ask Your Question: Write your question in natural language
- AI Processing: Datix xAgents identifies which tables are needed from which databases
- Query Execution: Queries are executed against each database
- Data Merging: Results are combined and joined automatically
- Results Display: See unified results with data from all sources
Example Queries
Cross-Database Join
"Show me all customers from the CRM database and their orders from the e-commerce database"
This query will automatically:
- Fetch customer data from CRM database
- Fetch order data from e-commerce database
- Join the results on customer ID
- Display unified results
Aggregation Across Databases
"What is the total revenue by region from sales database and warehouse database?"
Complex Analysis
"Compare user engagement metrics from analytics database with subscription data from billing database"
Permissions
To use Multi-Database Queries, you need:
- Permission:
multi_db_queries.execute - Plan: Growth plan or higher
- Access: Read permissions for all selected data sources
⚠️ Performance Note
Queries across multiple databases may take longer to execute. For best performance, ensure proper indexing and limit result sets.
Best Practices
- Specify databases clearly: Mention which database contains which data
- Use filters: Add WHERE conditions to reduce data volume
- Limit results: Use "top 100" or "limit 1000" in queries
- Check execution time: Monitor query performance in analytics
- Cache results: Save frequently used cross-database queries as templates
Limitations
- Maximum 5 databases per query
- Result set limited to 10,000 rows
- Queries timeout after 300 seconds
- Some database-specific functions may not be available