Created a new index that speeds up this query from about 300 seconds to under 15 consistently.  Unknown if this works properly on PostGres at this time.  Needs to be tested there.

SELECT DISTINCT r.id, r.name, r.searchname, r.categoryid, r.groupid, rf.name AS filename, rf.releaseid, rf.size FROM releases r LEFT JOIN releasefiles rf ON r.id = rf.releaseid WHERE r.relnamestatus IN (0, 1, 20, 21, 22) AND dehashstatus IN (-5, -4, -3, -2, -1, 0) AND passwordstatus >= -1 AND (r.name REGEXP'[a-fA-F0-9]{32}' OR rf.name REGEXP'[a-fA-F0-9]{32}')   ORDER BY rf.releaseid, rf.size DESC