I have a table with an index on value. My code is shown below I have 100,000 products that have an extra field for studio that I'm trying to query. Right now this takes 3.4 seconds to run. Any advice would be much appreciated.
// 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");