Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 08 SEP 1999 10:14:19AM Jim Jones wrote:

I need to get a record count on a large table several times a week. I've been using a select statement within an rbasic program to do this. I've noticed that when I use DUMPLH on a table there is a rowcount listed. Since the information displays so quickly, I assume this information must be stored somewhere within the table. How do I access this information? Is the rowcount accurate and up to date?

Thanks,

J.J.


At 08 SEP 1999 10:58AM Mike Ruane, WinWin Solutions Inc. wrote:

Use the Get.Reccount Function.

Syntax is as follows:

count=Get.RecCount(file_handle, status, forcecount)

Forcecount, when set to true, makes the system read every record. When set to false, Get.Reccount reads the count from the file header.

Hope it helps-

Mike Ruane

WinWin Solutions Inc.

WWW.WinWinSol.Com


At 08 SEP 1999 11:49AM [email protected] - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:

Mike's spot on with the code fragment.

As for whether the rowcount is accurate and updated, Revelation claims that it's only guaranteed to be accurate after a full file scan, which updates the header with the new count, however, each write and delete call to the BFS performs the update. Just keep in mind is possible, though not probable, for it to be off by one or two.

[email protected]

Sprezzatura Group

www.sprezzatura.com_zz.jpg


At 08 SEP 1999 01:37PM Victor Engel wrote:

The count is stored in the header of the first frame in the file. I have seen the number become out of whack in version 2.X but not in version 3.X. If you have select statements that show a status bar that occasionally exceeds 100%, I don't think you can count on the number.

I use this header information all the time, but have never had a situation where knowing the exact number was really critical. Besides GET.RECCOUNT, you can use the TCL command COUNT or COUNTROWS to read the count from the header if you add the LATENT key word. Note that this command loads @REC.COUNT.

One final thing. The record count in the header will not match the record count of your select if you have a quickdex or rightdex installed. This is because quickdex/rightdex creates an additional record with id %RECORDS%, which is included in the header count but not the select count.


At 14 SEP 1999 05:05PM Chuck Eder wrote:

The rowcount is accurate (in my experience) for tables that are less then 2.5 gigabytes in size. Much larger than that and the stats including percent full tend to get distorted or lack updated information. The rowcount is located in the header information of the first frame in the table.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/310a92f9711fe932852567e6004e3752.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1