Subject Re: [IBO] Re: RecordCount (for IBO v4) (or sooner if you like)
Author Helen Borrie
At 09:41 PM 01-12-00 +0000, you wrote:
>RecordCount will do the full blown record count as it
>does with
> > TQuery (only I will use a more efficient way).
>Clear enough - but one thing though, you're talking about a full
>blown record count - do you mean count(*) from <table>?! That would
>take an awfull long time if there are a lot of records, right?!


Not as long as a FetchAll and counting on the client would take.

I think the important point here is that RecordCount is NOT a sensible
thing to do in a client/server app, except in situations where count(*) is
a valid thing to do (like counting the members of an aggregate
operation). Quite apart from the performance hit, a precise record count
isn't achievable in a multi-user, transactional environment.

But Jason is presented with the need to provide for conversions of BDE apps
that use RecordCount for a whole lot of tasks that are valid in file-based
datasets and single users, just for compatibility, i.e. to make TIBO*
exactly emulate whatever was implemented in the BDE, good or bad.

If developers insist on retaining T**Table as the basis for their
connectivity and are unconcerned about optimizing their code for
client/server work, the TIBO provisions have to be able to cater for
it. One can **advise** people to use good client/server techniques but one
can't MAKE them.

As an anecdote, last summer, the water supply for Sydney became
contaminated with two well-known bacteria. The Council waited more than a
week, until a substantial number of people got sick, before publishing the
fact that Sydney water was bad. In detail it was explained that it was OK
to drink as long as every drop was boiled for 5 minutes before it was safe
to drink. The news was everywhere - radio, TV, newspapers, jokes on the
Internet, etc. etc., sales of bottled water from other states shot through
the roof and cheapskates like me got into a daily routine of boiling and
saving tap-water for drinking. TV stations repeatedly ran videos
demonstrating how to hand-wash dishes economically using pre-boiled water.

There was no excuse for anyone not to know about the drinking water problem
or how to avoid it. Yet there were many people who simply ignored the
warnings. Those who drank it and got sick regretted it; those who drank
it and didn't get sick were well-represented in Letters to Editors
proclaiming "I drank the water and didn't get sick so that proves that it
was REALLY safe all along."

Sorry for the long-windedness...


All for Open and Open for All
InterBase Developer Initiative ยท