Results 1 to 6 of 6

Thread: GENROW operator

  1. #1
    Join Date
    Jan 2008
    Posts
    45

    Unanswered: GENROW operator

    Friends,

    Could some one here explain me the significance of GENROW operator in an explain plan??

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    GENROW is a row constructor. Since everything(!) in SQL is a table, scalar values that have to be scanned must be converted to a table. Do you have a specific example? It may be easier to explain it with this.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Jan 2008
    Posts
    45
    Merge Into Cffs.addresser T1 Using (
    Select Aun
    From Cffs.client_addresser)t2 On T1.addressid=
    T2.addressid
    When Matched
    Then
    Update Set T1.addressdata=t2.addressdata, T1.lastwritten=
    Current_timestamp, T1.versionno =1
    When Not Matched
    Then
    Insert (t1.addressid, T1.countrycode, T1.modifiableind,
    T1.addressdata, T1.addresslayouttype, T1.versionno,
    T1.lastwritten)values(t2.addressid, 'us', '1',
    T2.addressdata, 'us', 1 , Current_timestamp)

  4. #4
    Join Date
    Jan 2008
    Posts
    45
    Hi Stolze,

    Above is the example for which i see GENROW operator in explain plan

  5. #5
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    How about showing us the plan as well? Or do you expect us to figure out how your table looks like and which statistics you have at the moment?

    What I can tell is that you have an INSERT statement in the THEN branch, and that INSERT contains a VALUES table constructor. So I would not be surprised to see a GENROW for this in the plan because it generates a row.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  6. #6
    Join Date
    Sep 2008
    Posts
    1
    When you see "GENROW" in an access plan, it is a "generate row" step. It represents the creation of temporary row(s) for use in subsequent steps, and is not something you need to worry about.

Posting Permissions

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