I have a web application that performs several queries, however a count query is taking 2 seconds to fetch and return the data to the application. My table in which I do COUNT has 230,000 lines with about 20 columns, how can I optimize this query?
SELECT COUNT(*) FROM myTable WHERE status = 1 AND category = 0;
What is the best way to perform data counting on a table with variation in the query?
Anyone can help me thank you right away!