The issue seems to be from an untuned query and lot of records (0.87 billion records), possibly Cartesian join. Review of indexes and query may help. Our architects have 15+ years of experience and we are AWS Registered partner.
We will need to have a discussion with you as to what exactly you are trying to achieve by these queries and review the table structures and sample data.
We have developed and supported large enterprise applications. Our architects have good understanding of what may go wrong in application and Database. We will need a test DB to run the queries and we are confident to fix the issues.
We will request for payment only after the work has completed and delivered.
About us: We are from VisionFirst Technologies Pvt. Ltd. We have designed, developed and implemented large insurance solutions (multiple mobile apps, webapps and custom softwares) with a few applications having 5000+ authenticated users. We have experience on multiple clouds such as Jelastic, AWS, Azure. Our tech stack includes offline/2G tolerant mobile apps, web applications, IOT and Analytics. Our business domains include insurance (Insurtech, Fintech), education (Edutech), Sports and logistics.