Shawn Invento
Shawn Invento

Reputation: 13

Performance of sum(1) vs count(1) for counting rows

Is there any difference performance-wise betweenselect sum(1) from Products and select count(1) from Products?

Upvotes: 1

Views: 1655

Answers (1)

ViKiNG
ViKiNG

Reputation: 1334

Both took same time on a very large table and when ran them together....came out with each having 50% cost:

enter image description here

Upvotes: 1

Related Questions