Functions to speedup users lookups by primary key