If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > row count

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-19-04, 07:05
ksexton ksexton is offline
Registered User
 
Join Date: May 2002
Posts: 47
row count

How do I get a table row_count by querying the system tables?
Are there multiple ways of doing it?
ie. a quick way and a long way?

Is there a better SQL editor that Command Center?

DB2 v.8.1

-Kevin
Reply With Quote
  #2 (permalink)  
Old 02-19-04, 07:11
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: row count

The CARD column in syscat.tables gives you the number of records in a table when runstats was last run ...

I like WINSQL for SQL s

Cheers
Sathyaram

Quote:
Originally posted by ksexton
How do I get a table row_count by querying the system tables?
Are there multiple ways of doing it?
ie. a quick way and a long way?

Is there a better SQL editor that Command Center?

DB2 v.8.1

-Kevin
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 02-19-04, 08:27
ksexton ksexton is offline
Registered User
 
Join Date: May 2002
Posts: 47
run stats?

How do I run the statistics against the table?

-Kevin
Reply With Quote
  #4 (permalink)  
Old 02-19-04, 08:32
Marcus_A Marcus_A is online now
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,197
See the runstats command in the Command Reference Manual.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On