streamlined histogram calculation through bulk replace
streamlined write permission determination through bulk replace
removed obsolete pending calculation db