I have a query which requires the usage of FROM_UNIXTIME and it takes at least 0.2-0.5 seconds and I need to use the same query with a different where statement at least 10 times on the page.
Here is the query
FROM `Users`
WHERE `Referrer` = '220048'
AND FROM_UNIXTIME(JoinDate, '%Y-%m-%d') = CURDATE()
AND `IP` NOT IN('IP', 'IP', 'IP')
AND `RegisterIP` NOT IN('IP', 'IP', 'IP')
AND `IP` != ''
AND `RegisterIP` != ''
How would I change the FROM_UNIXTIME to do the exact same thing but faster (Database contains around 900K rows)
Thanks in advance!