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 > CARDF column of SYSIBM.SYSTABLES

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-07-09, 07:09
alecs alecs is offline
Registered User
 
Join Date: Mar 2009
Posts: 15
CARDF column of SYSIBM.SYSTABLES

Hello,


I am using DB2 v9 on Windows XP SP 2 and I'm running the following query on SYSIBM.SYSTABLES:
SELECT NAME,CREATOR,CARDF,DBNAME,TSNAME,PARENTS,CHILDREN,CASE WHEN TYPE='T' THEN 'Table' WHEN TYPE='X' THEN 'Auxiliary' WHEN TYPE='G' THEN 'Temporary' END,CREATEDTS,ALTEREDTS,STATSTIME FROM SYSIBM.SYSTABLES WHERE( TYPE='T' OR TYPE='X' OR TYPE='G') ORDER BY 2, 1

I am referring to CARDF property which keeps the count of the rows on a certain table.
The problem is that after I add some rows in table columns (and commit), the CARDF value for it does not update. It returns 0 (-1) no matter how many rows I am adding.
Does anyone know if this sys table gets updated after a certain period of time? Or what is the problem here?




Thanks!
Reply With Quote
  #2 (permalink)  
Old 04-07-09, 07:19
umayer umayer is offline
Registered User
 
Join Date: Dec 2005
Posts: 273
CARDF does not contain "realtime statistic" data.

You need to run the RUNSTATS - utility to update this column
Reply With Quote
  #3 (permalink)  
Old 04-07-09, 07:25
alecs alecs is offline
Registered User
 
Join Date: Mar 2009
Posts: 15
OK thanks!
Reply With Quote
  #4 (permalink)  
Old 04-07-09, 09:37
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Also, you should not use sysibm.systables which can change from one release to another. You should use syscat.tables instead which is less likely to change and the contents of which are documented in the SQL Reference Vol 1 Appendix.
__________________
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