Node delete performance issue
Two appropriate options:


Use node_delete_multiple function instead of the node_delete(). I guess you need to do this only once, so this might be a faster solution if your server can execute the whole process at once (ie enough memory, not too many fields/modules, etc.).

$query_node = db_query("SELECT n.nid FROM node n,status s WHERE s.entity_id = n.nid  AND type = 'employees' AND s.field_employee_status_value = '2' AND n.status = '1'");               
$result_node = $query_node-&gt;fetchAll();

$nids = array();
foreach($result_node as $node) {
  $nids[] = $node-&gt;nid;
}
// Delete everything at once.
node_delete_multiple($nids);

You can also use Administration Views with Views Bulk Operations. You can filter the nodes based on what you need and then perform operations on all rows. This will process the deletion as a batch process. Downside is that you might need to install 2 additional modules if you don't have them already.