<p>I have the following code:</p>

<pre><code>SELECT &lt;column&gt;, count(*)
FROM &lt;table&gt;
GROUP BY &lt;column&gt; HAVING COUNT(*) &gt; 1;
</code></pre>

<p>Is there any difference to the results or performance if I replace the COUNT(*) with COUNT('x')?</p>

<p>(This question is related to a <a href="https://stackoverflow.com/questions/59294/in-sql-whats-the-difference-between-countcolumn-and-count">previous one</a>)</p>

The major performance difference is that COUNT(*) can be satisfied by examining the primary key on the table.
i.e. in the simple case below, the query will return immediately, without needing to examine any rows.
```
```
select count(*) from table
```
```
I'm not sure if the query optimizer in SQL Server will do so, but in the example above, if the column you are grouping on has an index the server should be able to satisfy the query without hitting the actual table at all.
To clarify: this answer refers specifically to SQL Server.  I don't know how other DBMS products handle this.