Live Mode
Query your database directly. No sync, no copy, no delay.
What is Live Mode?
Live mode lets rawquery query your source database directly instead of syncing data to the lakehouse first. Under the hood, DuckDB connects to your Postgres or MySQL instance and runs queries against the live tables.
This means your query results are always up-to-date - no sync lag, no stale data.
Supported Connectors
Live mode is available for database connectors that DuckDB can connect to via scanner extensions:
- PostgreSQL - via
postgres_scanner - MySQL - via
mysql_scanner
SaaS connectors (Stripe, HubSpot, etc.) do not support live mode - they require syncing via API.
How to Enable
- Go to Connections in your dashboard
- Click Add Connection and select PostgreSQL or MySQL
- Enter your credentials as usual
- In the Query Mode selector, choose Live
- Test the connection and finish setup
You can also switch an existing connection between Sync and Live mode from the connection settings.
# Via the API - create a live Postgres connectioncurl -X POST /api/v1/workspaces/{workspace_id}/connections \ -H "Authorization: Bearer rq_..." \ -H "Content-Type: application/json" \ -d '{ "name": "production-db", "query_mode": "live", "credentials": { "type": "postgres", "host": "db.example.com", "port": 5432, "database": "myapp", "user": "rawquery", "password": "..." } }'# Via the API - create a live Postgres connectioncurl -X POST /api/v1/workspaces/{workspace_id}/connections \ -H "Authorization: Bearer rq_..." \ -H "Content-Type: application/json" \ -d '{ "name": "production-db", "query_mode": "live", "credentials": { "type": "postgres", "host": "db.example.com", "port": 5432, "database": "myapp", "user": "rawquery", "password": "..." } }'Sync vs Live
| Sync | Live | |
|---|---|---|
| Data freshness | As of last sync | Real-time |
| Query speed | Fast (local DuckDB) | Depends on source |
| Source load | None at query time | Each query hits your DB |
| Historical data | Yes (Iceberg snapshots) | No (current state only) |
| Cross-source joins | Yes | Yes (DuckDB handles federation) |
| Network latency | None | Depends on source location |
| Data syncing | Yes (manual or scheduled) | Not available - queries go direct to source |
How it Works
When you query a live connection, rawquery uses DuckDB's scanner extensions to connect to your database:
- Your query is parsed and the referenced tables are identified
- DuckDB attaches your source database in read-only mode via
postgres_scannerormysql_scanner - Tables from the source appear in a DuckDB schema matching your connection name
- DuckDB pushes predicates and projections down to the source where possible, fetching only what's needed
-- If your live connection is named "prod"-- and your Postgres has a "users" table:
SELECT * FROM prod.users WHERE active = true LIMIT 100-- If your live connection is named "prod"-- and your Postgres has a "users" table:
SELECT * FROM prod.users WHERE active = true LIMIT 100When to Use Each Mode
Use Sync when:
- You need historical data or time travel
- Query performance matters more than freshness
- You want to reduce load on your production database
- You're joining with SaaS sources (Stripe, HubSpot, etc.)
Use Live when:
- You need always-fresh data
- Your source database can handle the additional query load
- You're prototyping and don't want to wait for syncs
- Your tables change frequently and sync lag is unacceptable