If you get a table scan then you are missing an index on the field from WHERE clause (likely 'group' column in your case).