How to handle large volume of custom dimension in Matomo

He have 40+ custom dimensions and there is a large volume of visitors coming and events coming in.

  • How do we manage?
  • What are the best practices?
  • What should be done for data retention?
  • How long it should be managed?