prune_database
Remove low-value historical data from your Google Search Console database to optimize storage while preserving recent and actionable insights.
Instructions
Apply data retention policy to a synced property database. Removes low-value rows (zero clicks, low impressions) from older data while preserving all recent data and actionable historical data. Runs VACUUM afterwards to reclaim disk space. This runs automatically after each sync, but you can also trigger it manually. Use preview_prune first to see what would be deleted.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| siteUrl | Yes | GSC property URL to prune. | |
| recentDays | No | Days of recent data to keep in full (default: 90). | |
| targetMinImpressions | No | For target countries: min impressions to keep zero-click rows (default: 5). | |
| preview | No | If true, show what would be deleted without actually deleting. Default: false. |