Optimizing Large OODB Queries