I have a view with a flag (relationship, only show flagged nodes). I have modified it a few times and now I see in the query output that views has the join added twice:
INNER JOIN {flag_content} flag_content_node ON node.nid = flag_content_node.content_id AND flag_content_node.fid = '9'
LEFT JOIN {flag_content} flag_content ON node.nid = flag_content.content_id AND flag_content.fid = '9'
Is there a performance hit for the extra LEFT JOIN?
LEFT JOIN {flag_content} flag_content ON node.nid = flag_content.content_id AND flag_content.content_id IS NOT NULL AND flag_content.fid = '9'
will do it and take out the more expensive INNER JOIN in the process.