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 > Sybase > Increase performance for bcp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-17-10, 08:44
y.holding y.holding is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Increase performance for bcp

Hi,

I am using bcp utility to extract data from database. I have extracted 14324590 rows from sybase database but it takes 17 minutes to download.

Could you please give suggest to how to increase performance for bcp out utility?


Thanks,
Michael Holding.Y
Reply With Quote
  #2 (permalink)  
Old 06-17-10, 09:58
Martijnvs Martijnvs is offline
Registered User
 
Join Date: Jan 2004
Location: The Hague/Utrecht, NL
Posts: 415
Try using bigger or smaller batch-sizes (more or less rows per io), the -b parameter.
__________________
I'm not crazy, I'm an aeroplane!
Reply With Quote
  #3 (permalink)  
Old 06-17-10, 10:11
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 443
Quote:
Originally Posted by Martijnvs View Post
Try using bigger or smaller batch-sizes (more or less rows per io), the -b parameter.

I guess the OP is extracting data, so in that case -b has no relation as its only related to bcp in. The only thing I can think of using a higher packet size to see if it helps.

Example:

bcp pubs2..titles out table_out -A 2048

sets the packet size to 2048 bytes for this bcp session. packet_size must be between the values of the default network packet size and maximum network packet size configuration variables, and it must be a multiple of 512.

Use network packet sizes larger than the default to improve the performance of large bulk-copy operations.
Reply With Quote
  #4 (permalink)  
Old 06-18-10, 08:07
agrawal.meet agrawal.meet is offline
Registered User
 
Join Date: Jun 2010
Posts: 51
In addition:
Also try and drop index on the table you are trying to bcp out if you have any.

Thanks,
Meet
Reply With Quote
  #5 (permalink)  
Old 06-18-10, 09:30
y.holding y.holding is offline
Registered User
 
Join Date: Jun 2010
Posts: 2
Thanks,

i used -A 8192 parameter in bcp out. it gives better performance compare then previous bcp opeeration.

Without -A 8192 parameter : it takes 17 minutes for 1.5 cr records
with -A 8192 parameter:it takes 8 minutes for 1.5 cr records.


Thanks for your help!
Reply With Quote
  #6 (permalink)  
Old 06-21-10, 04:02
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Also, do you really need to be extracting 15m rows from the database on a regular basis? I can understand this as a one off but it would be interesting to find out why you're doing this more regularly.
__________________
Mike
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