Is there a way to sync the database to the current tags

so I think some of the database entries were nuked that linked tag paths to id’s in the db. Is there anyway to have the historian sync back up? Thanks

I’ve tried looking for inserts in the logs, but the values are all ‘?’, Im assuming I would get some type of error a tag with history didn’t have an entry in the sqlth_te table, is this correct? Our database got way too big, over 300Gb, been trying to clean it up for over a week, delete statements take hours sometimes when run on the monthly tables. Thanks