Subject Re: [firebird-support] Re: If Not SELECT COUNT(*), Then What?
Author Woody
From: "danyschaer" <danyschaer@...>
> Hi Dimitry;
>
> Well, I can imagine a few situations right now. But the most important
> argument for making "count()" to work faster, is: because in the most
> popular databases engines it works faster; and, because "count()" works
> faster in other databases engines, programers are using it, even when
> it is crazy to do that.

How else can you get a total # of orders processed within a given date range
for a certain type of material and a particular customer? I do reports all
the time where only the totals are shown, not the details.

You can't keep statistics in the database for all conceivable combinations
of filtering that a client might want to see on a report or anywhere else.
The only way is to do a "select count" OR just a select and count the
records yourself.

IMHO, there is no way possible to store count information unless you know
ahead of time exactly what you want to count, therefore a "select count" is
a necessary query for me.

Woody (TMW)