Here is a list of tips for optimizing queries written to be run against the LDP reporting database environment from the FOLIO community:

Basic tips for faster queries in LDP databases