Thanks for the insight guys, I really appreciate the knowledge/experience share! Hash tables are a new area for me and I'd prefer not to step into any design potholes if I don't have to. smile

Just thought of another question. Using the one table design, if I have a hash table (mytable), is it possible to search through the keys/items using a wildcard (such as root.user.*) but also set a max search depth and return only unique results? Using the following hash keys/items in testtable for example:

root.user.adam
root.user.bobby
root.user.bobby.abc
root.user.charlie
root.user.charlie.abc
root.user.charlie.def.jkl

Ideally I just want to return "adam, bobby, charlie". But not (w/ or w/o prefix) "adam, bobby, bobby.abc, charlie, charlie.abc, charlie.def.jkl. Basically if "." is the field seperator, just search keys/items that only have 3 fields. I tried "$hfind(testtable,$root.user.[^.]*$,1-,r)" but that didn't work.

Or would I want to just get the total # of keys/items and loop through them all, checking just the first two tokens for "root.user" and if true then writing the third token to a variable if it's !isin the variable already? Seems like looping through an entire table would be slow but I guess thats what trying to wildcard search the keys/items does anyways right?

Last edited by beer; 17/10/19 05:56 PM.