Remove analytics data from database for a specific time period
search cancel

Remove analytics data from database for a specific time period

book

Article ID: 386712

calendar_today

Updated On:

Products

CA API Developer Portal

Issue/Introduction

How do we remove analytics data from database for a specific time period?

Environment

All Supported API Portal versions.

Resolution

MySQL query to delete analytics records more than 90 days from druid database.

mysql> update portal-druid.druid_segments set used=0  where DATE(end) < DATE(NOW() - INTERVAL 90 DAY);