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 > recompute statistics in db2 via JDBC

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-20-06, 04:28
dr_suresh20 dr_suresh20 is offline
Registered User
 
Join Date: Sep 2003
Posts: 218
recompute statistics in db2 via JDBC

We are inserting huge amount of data (could be several millions) during a fact upload. Therefore after the upload we recomputed the statistics. In oracle this can be done using the following sql statement:

analyze table <table_name> compute statistics

Do you know if there is any equivalent statement in DB2? I know there is runstats but it has to run via JDBC like a SQL statement.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 01-20-06, 05:14
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
If you are on V8 FP9 or above, you can use the Stored Proc ADMIN_CMD.

Otherwise, you'll have to call it using a command line only - may be invoked from your Java

Cheers
Sathyaram

Quote:
Originally Posted by dr_suresh20
We are inserting huge amount of data (could be several millions) during a fact upload. Therefore after the upload we recomputed the statistics. In oracle this can be done using the following sql statement:

analyze table <table_name> compute statistics

Do you know if there is any equivalent statement in DB2? I know there is runstats but it has to run via JDBC like a SQL statement.

Thanks.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 01-20-06, 07:44
dr_suresh20 dr_suresh20 is offline
Registered User
 
Join Date: Sep 2003
Posts: 218
thanks for your response.
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