To prevent performance degradation from unbounded login history growth, you should configure a retention period in your Login Record Settings rather than keeping unlimited history.
Recommended Configuration Navigate to Settings → System → Advanced → Login Record Settings Enable auto-deletion of login records Set a retention period (365 days is a common best practice) Once configured, records older than your specified retention period will be removed on a rolling basis What to Expect Zero downtime: This is a simple configuration change that does not require any system downtime Initial cleanup: After setting the retention period, FusionAuth will automatically delete existing records that exceed the retention threshold. Any existing login records older than the configured number of days become eligible for deletion based on this configuration — they are not grandfathered in. Rolling maintenance: Going forward, old records are automatically cleaned up, preventing the tables from growing indefinitely Implementation OptionsYou can make this configuration change yourself during a convenient time. The change can be applied through:
Admin UI: Navigate to Settings → System → Advanced → Login Record Settings System Configuration API: Use a PATCH or PUT request to /api/system-configuration with the loginRecordConfiguration settings Terraform: Configure the login_record_configuration block in your system configuration resourceThis proactive maintenance helps ensure your FusionAuth instance remains performant as your user base and login volume grow over time.
Related Documentation Update System Configuration API - Request Body - Details on configuring login record retention via API, including the loginRecordConfiguration.delete.enabled and numberOfDaysToRetain parameters Terraform System Configuration Resource - Configuration reference for managing login record settings with Terraform Search Login Records API - API for searching and paginating through login records Export Login Records API - API for exporting login records to CSV format