If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > GENROW operator

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-25-08, 10:04
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
GENROW operator

Friends,

Could some one here explain me the significance of GENROW operator in an explain plan??
Reply With Quote
  #2 (permalink)  
Old 02-25-08, 11:05
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #3 (permalink)  
Old 02-25-08, 11:58
db2rocks db2rocks is offline
Registered User
 
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)
Reply With Quote
  #4 (permalink)  
Old 02-25-08, 11:59
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
Hi Stolze,

Above is the example for which i see GENROW operator in explain plan
Reply With Quote
  #5 (permalink)  
Old 02-26-08, 02:23
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
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
Reply With Quote
  #6 (permalink)  
Old 09-29-08, 02:11
SubashB SubashB is offline
Registered User
 
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On