Analyze database activity
Compare database queries, rows read and rows written over the selected period.
Databases
Connect queues, forms and scheduled workflows to a Cloudflare D1 database. Run SQL with bound values, route work using lookup tables and archive database exports.
Then take action
Choose what your workflow does in Cloudflare D1.
Compare database queries, rows read and rows written over the selected period.
Group query measurements by time, database and the dimensions you select.
Update the account settings that control how D1 collects query insights.
Apply just the settings supplied in this request to the selected database.
Rank databases by the selected performance measure over a chosen time range.
Name a new database and choose its location and read replication settings.
Remove the selected database from the connected Cloudflare account.
Look up dataset columns and types before writing a query against the analytics service.
Query recorded database requests for the selected period using SQL.
Query D1 statement activity over a selected time range.
Wait for the database export and return its SQL file for a storage step. Use the bookmark action for larger exports.
Get the bookmark for the database at a given time so you can review the point before restoring.
Review recorded queries for the selected database and time range, ordered by the measure you choose.
Read suggestions for improving queries on the selected database and follow the cursor for additional results.
Browse a page of databases or filter the list by name.
Look up the name, size and configuration of a selected database.
Check how query insights are configured for the connected account.
Restore a recently deleted database by its ID. Choose a new name if the original name is taken.
Supply the full configuration for the selected database.
Rewind the selected database to a bookmark or timestamp within its recovery window.
Start with a published template and adapt it to your work.
Store the ID, subject, and date of each email received by the private Mailhook.
Look up a certificate by serial number and refresh its hostname and expiry record in D1.
Record subscription cancellation and expiration events in a Cloudflare D1 table.
Watch a domain’s MX, SPF and DMARC records.
Look up a product in D1 and create a card in its assigned Trello list.
Keep one D1 journal entry per order event, even when the producer sends the event twice.
Post the IDs of paid orders still awaiting shipment after two business days.
Export database schema and data as SQL and save a dated copy in the selected R2 bucket.
Connect a Cloudflare account Enter your account ID and a D1 API token. Cloudflare grants D1 permissions at account level. Use a separate account when you need credentials isolated from production databases.
Choose the database for each action Select a database and bind incoming values to SQL placeholders. A unique event ID lets a queue consumer receive the same business event again safely.
Query analytics and recover data Analytics actions require the relevant Analytics Read permission. Time Travel availability depends on the recovery window for your database. Test restoration on a dedicated database.