Consultor Eletrônico



Kbase 15230: Record count for table in database proutil tabanalys select
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Record count for table in database proutil tabanalys select

This knowledgebase entry describes methods for counting records in
database tables.

1) Using SQL "SELECT" statement:

Right from the procedure editor, you can use the following SQL
statement to quickly count the records in a table:

SELECT COUNT(*) FROM <table>.

EX: From the demo or sports database: SELECT COUNT(*) FROM customer.

2) PROUTIL TABANALYS:

On version 7.3A and above, you can use

proutil <dbname> -C tabanalys > outfile

to get a count of all the records in the database.

Sample output is below:

PROGRESS Version 7.3A as of Wed Nov 9 11:24:51 EDT 1994


PROGRESS Database Analysis

Database: /u4/psc-backup/psc
Options: tabanalys
Date: Fri Nov 3 13:10:18 1995


BLOCK ANALYSIS (3906)
==============

1 master block(s) found in the database.


RECORD BLOCK SUMMARY (6129)

---Record Size--- ---Fragments--- Scatter
Table Records Bytes Min Max Mean Count Index Index
bundle 0 0 0 0 0 0 0.0 0.0
contact 18618 1755279 54 214 94 18712 1.0 5.2
cpu 102375 4094861 29 46 39 102663 1.0 4.8
cpu_lock_table 119 2337 16 21 19 119 1.0 5.8
customer 10519 3048839 190 549 289 10657 1.0 4.6
email-info 492 53441 53 193 108 504 1.0 4.9
employee 318 34097 81 137 107 318 1.0 4.6
hardware 6267 498947 40 105 79 6311 1.0 4.3
last-record 44 662 12 18 15 44 1.0 6.0
maint_contr 150115 8031750 35 72 53 157993 1.1 5.8
master 2 345 56 289 172 2 1.0 1.8
master2 3 402 56 289 134 3 1.0 1.9
media 524063 77771253 80 307 148 559424 1.1 5.1
mediarf 307491 25187350 27 107 81 307612 1.0 3.0
port_table 23 387 10 25 16 23 1.0 6.3
printdef 13 727 40 66 55 13 1.0 1.5
prod-group 0 0 0 0 0 0 0.0 0.0
prod-mast 1591 158810 40 131 99 1597 1.0 4.4
prod-matrix 248 13252 41 70 53 248 1.0 2.0
returns 8622 1443264 52 436 167 8654 1.0 3.6
sercode 163 102161 478 1159 626 175 1.0 5.1
site 3 236 59 113 78 3 1.0 1.8
site-env 16 1801 77 130 112 16 1.0 5.7
soft-link 0 0 0 0 0 0 0.0 0.0
time-stamp 0 0 0 0 0 0 0.0 0.0
tsc_chng_rcd 0 0 0 0 0 0 0.0 0.0
tsc_rlog 0 0 0 0 0 0 0.0 0.0
_Db 1 1153 1153 1153 1153 3 1.5 2.7
_Field 688 112046 126 335 162 689 1.0 4.3
_Field-Trig 0 0 0 0 0 0 0.0 0.0
_File 39 6529 128 333 167 42 1.1 5.5
_File-Trig 0 0 0 0 0 0 0.0 0.0
_Index 121 9244 70 86 76 121 1.0 5.4
_Index-Field 190 12261 63 66 64 190 1.0 5.3
_Sequence 0 0 0 0 0 0 0.0 0.0
_User 0 0 0 0 0 0 0.0 0.0
_View 0 0 0 0 0 0 0.0 0.0
_View-Col 0 0 0 0 0 0 0.0 0.0
_View-Ref 0 0 0 0 0 0 0.0 0.0
-----------------------------------------------------------
Totals: 1132144 119474k 10 1159 108 1176136 1.0 5.1


137051 RM block(s) found in the database.
90.93% of the RM block space is used.

97777 index block(s) found in the database.

0 free block(s) found in the database.

3 index table block(s) found in the database.

1 sequence block(s) found in the database.

15 empty block(s) found in the database.

234848 total blocks found in the database.

database analysis complete Fri Nov 3 13:24:30 1995

Progress Software Technical Support Note # 15230