Subject | Re: [firebird-support] Re: If Not SELECT COUNT(*), Then What? |
---|---|
Author | Woody |
Post date | 2008-12-10T15:11:51Z |
From: "Martijn Tonies" <m.tonies@...>
total count so it's not always a choice you can make as a developer. For
instance, in one of my apps, the client wanted to always see a total count
of records that matched the filtering set for the form. These are not grid
type forms, they only display one record (set) of information at a time so
there isn't any other way of visually informing the user of the number of
matching records.
While we can certainly tell clients that doing a count prior to fetching the
information does increase the time, I've never had any count take enough
time to make any difference anyway. And I use SELECT COUNT for most of my
report generation code to display a progress bar so that longer reports,
such as monthly and fiscal data, give the user some feedback since they
generally take a little longer to run.
With proper usage and a good database design, I see no problem using things
like SELECT COUNT for visual feedback of some type to the user.
Just my $0.02
Woody (TMW)
>I have had clients specifically request such things as current count versus
> If there is a case when a user needs lots of rows (eg: an
> export of data), I never display "progress", only that the
> application is busy and perhaps display the current number
> of rows exported.
>
> In all other situations, the number of rows requests should
> be small that no notion of "progress" is required.
total count so it's not always a choice you can make as a developer. For
instance, in one of my apps, the client wanted to always see a total count
of records that matched the filtering set for the form. These are not grid
type forms, they only display one record (set) of information at a time so
there isn't any other way of visually informing the user of the number of
matching records.
While we can certainly tell clients that doing a count prior to fetching the
information does increase the time, I've never had any count take enough
time to make any difference anyway. And I use SELECT COUNT for most of my
report generation code to display a progress bar so that longer reports,
such as monthly and fiscal data, give the user some feedback since they
generally take a little longer to run.
With proper usage and a good database design, I see no problem using things
like SELECT COUNT for visual feedback of some type to the user.
Just my $0.02
Woody (TMW)