Professional Web Applications Themes

runstats and embedded sql - IBM DB2

It will use the original. You should rebind your application after RUNSTATS. -- Larry Menard IBM Workstation Database (DB2) Performance Team Defender of Geese and of All Things Natural "Rudolf Bargholz" <bargholzspamcop.net> wrote in message news:1057772975.356811fuchs.cyberlink.ch... > Hi, > > if I create embedded SQL command and perform runstats AFTER I have created > the bind file, will the original statistics be used for optimization of the > SQL commands or will the opimizer use the current runstats when calling one > of the embedded SQL functions. > > Regards > > Rudolf Bargholz > >...

  1. #1

    Default Re: runstats and embedded sql

    It will use the original. You should rebind your application after
    RUNSTATS.

    --
    Larry Menard
    IBM Workstation Database (DB2) Performance Team
    Defender of Geese and of All Things Natural


    "Rudolf Bargholz" <bargholzspamcop.net> wrote in message
    news:1057772975.356811fuchs.cyberlink.ch...
    > Hi,
    >
    > if I create embedded SQL command and perform runstats AFTER I have created
    > the bind file, will the original statistics be used for optimization of
    the
    > SQL commands or will the opimizer use the current runstats when calling
    one
    > of the embedded SQL functions.
    >
    > Regards
    >
    > Rudolf Bargholz
    >
    >

    Larry Menard Guest

  2. #2

    Default Re: runstats and embedded sql

    Larry Menard wrote:
    > It will use the original. You should rebind your application after
    > RUNSTATS.
    >
    I think it depends on whether he's using static (need to rebind) or
    dynamic SQL (no need to rebind). Doesn't it?

    Regards,
    Miro

    miro flasza Guest

  3. #3

    Default Re: runstats and embedded sql

    Hey, Miro.

    He said he had already created a bind file, so I presumed all SQL in the
    app is static. But you're right, if there is any dynamic SQL in the
    application it will use the current stats.

    In fact, now that I've re-read the original question, he doesn't say when
    he actually binds the app. The plan is generated (and therefore the
    statistics are referenced) at the time the bind is done, which is not
    necessarily the time the bind file is created.
    --
    Larry Menard
    IBM Workstation Database (DB2) Performance Team
    Defender of Geese and of All Things Natural


    "miro flasza" <mirotorolab.ibm.com> wrote in message
    news:behvr2$dnr$1hanover.torolab.ibm.com...
    > Larry Menard wrote:
    > > It will use the original. You should rebind your application after
    > > RUNSTATS.
    > >
    >
    > I think it depends on whether he's using static (need to rebind) or
    > dynamic SQL (no need to rebind). Doesn't it?
    >
    > Regards,
    > Miro
    >

    Larry Menard Guest

Similar Threads

  1. runstats on multiple tables
    By mari in forum IBM DB2
    Replies: 2
    Last Post: September 4th, 01:25 PM
  2. runstats - oracle
    By janagana in forum IBM DB2
    Replies: 5
    Last Post: August 23rd, 05:31 PM
  3. runstats use all the CPUs?
    By Fan Ruo Xin in forum IBM DB2
    Replies: 2
    Last Post: July 26th, 12:22 AM
  4. Runstats issue
    By Kota in forum IBM DB2
    Replies: 3
    Last Post: July 7th, 12:50 PM
  5. runstats
    By xixi in forum IBM DB2
    Replies: 10
    Last Post: July 3rd, 12:51 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139