I am running this query.
SELECT dom,
COUNT(url) AS counted
FROM results
GROUP BY dom
ORDER BY COUNT(url) DESC;
I have dom indexed but I cant index url because its a longtext. what can I do to make it faster?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
count(url) means to count rows that url field is not null. Perhaps you can increase performance creating and index like:
And then change your query to:
RDBMS only need index, no need to take data from table, if you only ask for both listed fields.