EWM creates large amount of data for each process and stores these at complicated tables. You need to create periodic background jobs to clean these tables to improve database access and performance. I will give you some basic jobs for common use, feel free to add if you want to share more.
Deletes DB entries for zero stock quantities, index entries without stock
Deletes the dispatch message log for goods movements between EWM and ERP older than X days
Deletes alerts older than X days
Deletes Application logs(BALDAT & BALHDR Tables)
It is clear from my explanations, but you can learn more from definition of SAP.
Don't forget the good old SARA transaction with business data archiving: