First page Back Continue Last page Summary Graphics
Efficient Queries II
Use joins rather than sub-selects
If sub-select must be used, try to use EXIST
Use > 0 rather than != 0
Use index while counting: SELECT COUNT(pk)
Avoid HAVING
Avoid NOT in WHERE clause
If column is indexed, use IN or UNION instead of OR
Notes: