Skip to content

Instantly share code, notes, and snippets.

@Geogouz
Created January 24, 2018 10:59
Show Gist options
  • Save Geogouz/d04698a68a80118cfccaba5537c0bff8 to your computer and use it in GitHub Desktop.
Save Geogouz/d04698a68a80118cfccaba5537c0bff8 to your computer and use it in GitHub Desktop.
Good indexes?
SELECT p.content, u.name
FROM posts p, admins a, users u
WHERE
p.tag = a.tag and
a.id = u.id and
p.content = 'Hello World';
SELECT u.name, p.date
FROM users u, posts p
WHERE
u.userid = p.userid and
p.content = 'Hello World';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment