The RZ package is not optimized for handling directories with large numbers of data objects; the memory resident part of the data describing the keys becomes very large and storage and retrieval become more expensive, both in CPU time and real time, when the number of data objects exceeds a few thousands. The concept of partitioned directory has been introduced to attenuate these effects. Subdirectories are automatically created when needed, with keys which permit to keep track of their contents and to quickly access the right partition. Partitioning is invisible to the user, who just has to give its characteristics when creating the directory. Subsequent storage and retrieval of data objects in a partitioned directory follow the same rules as for a normal directory, as far as the calling sequences of the user interface subroutines are concerned. It should be noted however that direct calls to RZ routines for handling such directories would be extremely hazardous and should be avoided. To further optimize real time usage in storing data, HEPDB also provides a facility to store several objects, belonging to the same directory, in one pass. In real time, the gain is about proportional to the number of objects one stores at once.