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 > Inserts (NLI) Vs Cursor load

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-14-10, 11:50
ncmdba ncmdba is offline
Registered User
 
Join Date: May 2010
Posts: 8
Inserts (NLI) Vs Cursor load

Hi,

I have a data massaging logic which massages 400 million data from table and load into a target table.Both tables have same partition keys and the database is a also partitioned.My question here is which is faster cursor load or select insert with table not logged initially(NLI)? I know both doesn`t write transaction logs.I know cursor load goes through co ordinator node.How does the data move in NLI.Is it done parallely by the db2?? can someone share their knowledge on this???


Thanks,
Reply With Quote
  #2 (permalink)  
Old 05-15-10, 06:48
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
My estimation (without trying it) is that the cursor load is faster than inserts with NLI (not logged initially), because the Load utility bypasses the DB2 data manager on the insert and lays down a page at a time (instead of processing each row as does an insert).

I don't think NLI affects anything but logging, and the insert will be the same as a regular insert in all other respects.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 05-15-10, 18:38
ncmdba ncmdba is offline
Registered User
 
Join Date: May 2010
Posts: 8
Thank you Marcus!! But cursor load takes the data through the co ordinator node whereas inserts use parallelism and if there are more number of CPUs doesn`t inserts are faster than cursor load?? doesn`t co ordinator node becomes a bottle neck???
Reply With Quote
  #4 (permalink)  
Old 05-15-10, 19:01
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Inserts have to go through coordinator node also. Load utility uses parallelism also. I would try a test if you want be sure.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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