-- It is also very fast when trying to find all transactions for the progeny of 5 
-- projects (5,6,7,8,9), but only if you are only querying a sub-ledger directly:

--explain analyze
select lg.*
    from 	subledg_A	lg
    join	proj_rel	pr	on pr.prog_id = lg.proj
    where	pr.anst_id = 5;