Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In a DB2 Explain Plan, what does TBSCAN GENROW (line 5 below) mean?

SELECT STATEMENT ( Estimated Costs =  1.811E+03 [timerons] )
   1 RETURN
      2 NLJOIN
          3 [O] TBSCAN
              4 SORT
                  5 TBSCAN GENROW
          6 [I] FETCH EKKO
              7 IXSCAN EKKO~1 #key columns:  2

The IBM docs say GENROW is

"A built-in function that generates a table of rows, using no input from tables, indexes, or operators"

What does that mean from a performance perspective?

Also, this is in an SAP system if that matters.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I think I've figured it out. GENROW means it's creating a temporary table which is then joined to an actual table. This is usually done when the query contains an IN (...) statement. Specific to SAP, this is usually done for FOR ALL ENTRIES queries.

share|improve this answer
    
Interesting... But... the question - what's the actual performance impact? –  user1459 Apr 11 '11 at 22:26
    
In SQL Server, it would mean creating a row that doesn't come from a table –  Gaius Apr 12 '11 at 6:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.