SELECT iss.subscription_id FROM institutional_subscriptions iss, subscriptions s, subscription_types st WHERE POSITION(UPPER(LPAD(iss.domain, LENGTH(iss.domain)+1, '.')) IN UPPER(LPAD(ec2-3-238-71-80.compute-1.amazonaws.com, LENGTH(ec2-3-238-71-80.compute-1.amazonaws.com)+1, '.'))) != 0 AND iss.domain != '' AND iss.subscription_id = s.subscription_id AND s.journal_id = 22 Speed: 0.876 ms