Subject If Not SELECT COUNT(*), Then What?
Author inoffensive_2009
Hi Folks:

I had a bug in a function that is passed a table
name and a where clause, and returns a count of the
records that qualify for the where clause, if one is
passed in.

The function builds an SQL of

SELECT
COUNT(*) FROM
<Table Name>
WHERE <--------- If where clause passed in
<Where Clause>;

While tracking down the problem I read in Helen's
book that SELECT COUNT(*) is inefficient.

Should I re-think the use of COUNT(*) in this
function?

Thanks
Larry