I have two choices when writing an SQL statement with the COUNT
function.
SELECT COUNT(*) FROM <table_name>
SELECT COUNT(some_column_name) FROM <table_name>
In terms of performance, what is the best SQL statement?
Can I obtain some performance gain by using option 1?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…