Today, Monty Linden mentioned that future Experience KVP database work is required and if there were any feature requests, they should be filed soon.
So with that said, here are some much needed functions:
llInsertKeyValue(string key_name, string key_value, integer index); inserts key_name and value at index number (this is a create)
llMoveKeyValue(string key_name, integer index) moves key_name to index number (alternative to delete, then insert)
llFindKeyValue(string key_name) returns the index number key_name is at
The Experience KVP database is indexed.
Having the above functions will allow sorting/grouping/partitioning/defragging/cleanup capabilities.
This will significantly cut down on mass lookup/find protocols, wasting literally millions of requests per user a year and in some cases, per week.
Regex for Experience KVP would be far better though...