$ 0 0 Instead of the nested SELECTs use database JOINs if possibleonly read the table fields which you really need, don't use "*" (all fields)