Query optimization in distributed databases by predicate analysis and semijoin techniques