Guides

Step-by-step tutorials to help you get the most out of MynaDB. From basic operations to advanced configurations.

Getting Started

Data Operations

Storage & Maintenance

Integration

High Availability

Featured Guide: SQL Queries

MynaDB supports full SQL via Apache DataFusion. Here's a quick reference for common query patterns:

Basic Query

bash
curl 'http://localhost:7000/query/mydb' -d 'SELECT * FROM cpu LIMIT 10'

Aggregation

curl 'http://localhost:7000/query/mydb' -d "
SELECT host, AVG(usage) as avg_cpu
FROM cpu
GROUP BY host
ORDER BY avg_cpu DESC
"

JOIN Query

curl 'http://localhost:7000/query/mydb' -d "
SELECT c.host, c.usage as cpu, m.used as memory
FROM cpu c
JOIN memory m ON c.host = m.host
WHERE c.usage > 80
"
💡 See More

Check out the full SQL guide and examples page for comprehensive coverage.

Featured Guide: Retention Policies

MynaDB supports automatic data expiration to manage disk space. Configure retention in config.toml:

toml
[retention]
enabled = true           # Enable background retention
default_days = 7         # Delete data older than 7 days
interval_secs = 3600     # Check every hour

Manual retention via API:

# Delete partitions older than 30 days
curl -X POST http://localhost:7000/retention/mydb/default/cpu \
  -H "Content-Type: application/json" \
  -d '{"older_than_days": 30}'

Need Help?