Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    218

    Unanswered: 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.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

  3. #3
    Join Date
    Sep 2003
    Posts
    218
    thanks for your response.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •