Record count

casorohi

Member
Hi Everyone need your help, how to get the table record count. Actually there is requirement that I have to check the record count for few table and compare with a standers value twice a day.

Now I want to know which one is the best and fastest way to do:


  1. Record count through 4GL
  2. Records count through SQL count(*)
  3. Update the stats and then read from system table
  4. Or any other system table/view where we can read the values or from where “tabanalys” report picks the data ?

We are using Progress 102B02 with Redhat 64bit
Thanks
 

cj_brandt

Active Member
Why not just time them and see ?
If the tables are in the same area, they are large, and there are few other tables in the same area - then a table analysis might be the best option.
If the tables are smaller - less than 1 million records or in a large area with lots of other tables, then an SQL count or 4gl count might be the best option.

tabanalys picks up the data by reading the blocks in the area - the db doesn't maintain a count of table records in a system table.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
For small tables ABL is sufficient. For large tables it can be painfully slow. And even more so client/server. SQL can be fairly fast, but you have to measure that performance for yourself. And automation can be a bit of a pain.

Before testing however, I would be asking myself, "why do I need to do this in the first place?"
 
Top