In PokerTracker 4 click "Database -> Database Management", click your database then "Rebuild Cache -> Full Cache Rebuild". Be prepared for this to take a considerable amount of time if you have a large database, so you'll want to run it when you're not using PokerTracker 4 for a ...