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.


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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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