Split query in terms of OR condition and these queries in parallel using application logic. If you can only run one query then use union-all. But remember union-all is same as running two queries sequentially.