Optimizes random value retrieval in the SQLite implementation to not be as cabbage