Subject RE: [ib-support] Record Count
Author Mike Grover
This is a read only database.
The user needs to see a record count and some of the fields from a query.


-----Original Message-----
From: Paul Reeves [mailto:paul@...]
Sent: Wednesday, November 07, 2001 3:17 PM
Subject: Re: [ib-support] Record Count

Woody wrote:
> From: "Mike Grover" <mike@...>
> > This is not using IBComponents, ODBC Query, Using a count() means I have
> to query twice :-( , Very time consuming on large queries..
> A Count(*) query should not take that long regardless of the number of
> records. It is performed on the server side so it should return quickly.
Not necessarily. Count has to literally count all the records. It has to do
this because the engine cannot tell which records are visible to the current
transaction without actually visiting each of them. It will be quicker than
actually fetching all the records counted, but it might not feel like it. This
is one of the few downsides of the MGA.

That said, why do you need to do a count? What are you counting? The total
rows in the table, or a subset? Do you know in advance what questions you are
going to ask? And how many users are involved in updating the database?


Paul Reeves
taking InterBase further

To unsubscribe from this group, send an email to:

Your use of Yahoo! Groups is subject to