-
-
Save blt/1175862 to your computer and use it in GitHub Desktop.
slow query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT p.name as procedure_name, addr.zip as zip, | |
s.procedure_id as proc, s.id | |
FROM slots AS s, procedures AS p, organizations AS o, addresses_organizations as au, addresses as addr | |
WHERE s.provider_id = o.id | |
AND s.procedure_id = p.id | |
AND au.organization_id = o.id | |
AND addr.id = au.address_id | |
AND addr.zip LIKE '".$zipcode."%' | |
ORDER BY random() | |
LIMIT 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment