Board index » delphi » TTable.Recordcount

TTable.Recordcount

If a use a normal paradox table with a recordcount of about 15000
records, recordcount is real slow. (About 1.5 sec on a P450). Is this a
delphi bug or can I do something about it.

Yke Smit

 

Re:TTable.Recordcount


On Wed, 08 Sep 1999 15:46:25 +0200, Yke Smit <Y...@bridgesoft.com>
wrote:

Quote
>If a use a normal paradox table with a recordcount of about 15000
>records, recordcount is real slow. (About 1.5 sec on a P450). Is this a
>delphi bug or can I do something about it.

>Yke Smit

No doubt one of the experts will either correct or add to my comments:
[1]

AFAIK a TTable.RecordCount against a local database causes each row in
turn to be fetched. The time taken for RecordCount performance is
directly proportional to the number of rows...

[1]
If I'm wrong - at least I will have learned something :-)

--
Gary Wilmot
Senior Developer
Vizual Business Tools Ltd
http://www.vizual.co.uk

Re:TTable.Recordcount


Since Paradox tables store the record count in the table header retrieving
it should be instantaneous. Can you show us the code that is "slow" and
provide the approximate time required?

Bill

--

Bill Todd - TeamB
(TeamB cannot respond to questions received via email)

Re:TTable.Recordcount


Yke Smit schrieb in Nachricht <37D668B1.877F7...@bridgesoft.com>...

Quote
>If a use a normal paradox table with a recordcount of about 15000
>records, recordcount is real slow. (About 1.5 sec on a P450). Is this a
>delphi bug or can I do something about it.

>Yke Smit

I have the same bad experience (in Network to use this is impossible).
Use instead DbiGetRecordCount ( see Details BDE API-Helpfile).
This function is very fast for dBase Tables and i think with Paradox too

Hans

Re:TTable.Recordcount


On Wed, 8 Sep 1999 15:35:30 -0700, "Bill Todd"

Quote
<b...@nospam.dbginc.com> wrote:
>Since Paradox tables store the record count in the table header retrieving
>it should be instantaneous. Can you show us the code that is "slow" and
>provide the approximate time required?

>Bill

Is that the record count of all records stored in the table? Surely
TTable.RecordCount cannot use this because the table may be filtered?

--
Gary Wilmot
Senior Developer
Vizual Business Tools Ltd
http://www.vizual.co.uk

Re:TTable.Recordcount


The RecordCount property does not respect a filter. It will return the count
for the table, not the records that pass the filter. To get a count of the
records that pass the filter would require a table scan and that would be
very slow on large datasets.

Bill

--

Bill Todd - TeamB
(TeamB cannot respond to questions received via email)

Re:TTable.Recordcount


Quote
>Bill Todd wrote:

>The RecordCount property does not respect a filter. It will return the >count for the table, not the records that pass the filter. To get a >count of the records that pass the filter would require a table scan >and that would be very slow on large datasets.

Doesn't work this way for me (D3 with Paradox 5/7 tables), actually
Table.Recordcount does return the count that passes the filter.  :|
________
Andreas

Re:TTable.Recordcount


It shouldn't, unless the filter is using an index. I have not tried that
lately.

Bill

--

Bill Todd - TeamB
(TeamB cannot respond to questions received via email)

Other Threads