Indexing

From: Indexing atoms vs. pairs -- performance by Jan W.

The lesson is, as a very old advice: use as few compound terms as you can for the storage and write a wrapper around it that turns the data in the shape you want to have it. That makes the clauses shorter and builds fewer indexes. Of course, this is mostly interesting if you have a lot of clauses and notably memory is getting a problem.