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. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

SELECT STATEMENT ( Estimated Costs =  1.811E+03 [timerons] )
      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
up vote 3 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


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.