How would you optimize this 2 milion records table or queries?
Please create the following index

create index domains_ix_status_date on domains (domain_whois_status,domain_whois_date);


We're traversing through the index where the rows are already ordered by the way we want them (ORDER BY domain_whois_status), we check the condition domain_whois_date &gt; 0 (still within the index structure) and we retrieve only the relevant rows and output them.