This statement appears inefficient because only one one out of 10 records are selected and only 1 of 100 entries contain comments.
What can I do to improve it ?
$query = "SELECT
A,B,C,
(SELECT COUNT(*)
FROM comments
WHERE comments.nid = header_file.nid)
as my_comment_count
FROM header_file
Where A = 'admin' "
edit: I want header records even if no comments are found.