Why is Select 1 faster than Select count(*)?

user290 picture user290 · Sep 10, 2009 · Viewed 11.3k times · Source

In Oracle, when querying for row existence, why is Select 1 fast than Select count(*)?

Answer

MartW picture MartW · Sep 10, 2009

It is better still to use EXISTS where the RDBMS supports it or an equivalent, as this will stop processing rows as soon as it finds a match.