Is the speed of the query I write to the table with a lot of data normal?
I have a table named “Applications” where I keep track of the applications made by my candidates to vacancies. Now, I need to write a statistical query for HRs, and when an HR logs in, I should bring the candidates who applied to the vacancies created by that HR. Since there are filters concurrently in my query, I had to include other tables related to candidates as well. However, my query is slow and consumes an incredible amount of RAM. My 16 GB RAM Linux server gets filled up after 1-2 hours of running the project and crashes it. When I checked the server, I saw that this query alone was constantly eating up RAM. How do you think I can optimize this, or what might be wrong with the query? Additionally, there are +400,000 applications and +100,000 candidates