Is there anyway to make this query faster? When I have benchmarking enabled I can see that this code takes 3.40 seconds to generate. I have 100,000 products with this extra_field. Can anyone please help?
Code:
// GET STUDIOS INFO //
$getstudios = func_query("SELECT DISTINCT value AS studioname FROM $sql_tbl[extra_field_values] WHERE fieldid='4' AND value IS NOT NULL ORDER BY RAND() LIMIT 20");