Optimized queries based on 'Id'