Yeah, all_objects_party_privelege_map sped things up quite a bit... I guess that Oracle view uses CONNECT BY while in Postgres we had to fall to a work-around (however ellegant) with tree_right() that is probably not as efficient as internal implementation of CONNECT BY?... May it make sense to try and make tree_right() a C function instead of PL/PGSQL one?