Lightroom uses SQLite as a database. You could use the sqlite database browser to compact it.