Deploy an analytics replica in minutes
# spicepod.yamldatasets: - from: mysql:mydb.orders name: orders params: mysql_host: db.example.com mysql_user: replicator mysql_pass: ${secrets:MYSQL_PASS} mysql_db: mydb acceleration: enabled: true engine: cayenne # columnar analytics replica mode: file # resume from the saved binlog position refresh_mode: changes # stream inserts, updates, deletes primary_key: id # Cayenne keeps one row per keysql> -- a large analytical query, on the replica SELECT status, COUNT(*) AS orders, SUM(total) AS revenue FROM orders GROUP BY status ORDER BY revenue DESC;# example outputshipped 18204 1204550pending 3120 208400Connect your operational database
In a
spicepod.yaml, the Spice configuration file, list each table to replicate. Setrefresh_modetochangesand aprimary_keyto stream every insert, update, and delete to the analytics replica. For MySQL, setlog_bintoON,binlog_formattoROW,binlog_row_imagetoFULL, andbinlog_row_value_optionsto empty. Keep binlogs longer than the longest Spice downtime. Grant the userSELECT,REPLICATION SLAVE, andREPLICATION CLIENT.Deploy Spice anywhere
Start Spice locally with
spice run, or deploy it as a sidecar, at the edge, in your cluster, or on Spice Cloud.Query from any client
Run queries against the replica from agents, dashboards, or your own apps.


