all groups > sql server programming > november 2005 >
You're in the

sql server programming

group:

loading datetime data using the bcp api is slow



loading datetime data using the bcp api is slow Vivek
11/8/2005 9:48:02 PM
sql server programming: Hi,

Iam using the bcp api to load data. i find that the performance is good for
most data types. However it slows down drastically for datetime data.
In my program the datetime data is bound as SQLCHARACTER. I guess this leads
to a lot of conversion/parsing at the server side.
Is there a better way to load timestamp data ?

RE: loading datetime data using the bcp api is slow John Bell
11/9/2005 12:02:02 AM
Hi

The bcp_bind type equivalent for SQL_TYPE_TIMESTAMP is SQLCHARACTER. If the
speed was due to the conversion of datatypes you should be able to prove it
by changing the datatype of the destination column and see an improvement. If
there is a significant difference you may wish to try loading this data into
a staging table with character datatypes.

John

[quoted text, click to view]
RE: loading datetime data using the bcp api is slow Vivek
11/11/2005 4:26:04 AM

Hi,

Changing the destination column to (say) char(30) does not show any
improvement in speed. So does that mean conversion is not an issue? At this
point iam not sure where the bottleneck is.

Thanks

Vivek

[quoted text, click to view]
RE: loading datetime data using the bcp api is slow John Bell
11/11/2005 4:33:02 AM
Hi Vivek

It looks that way!!! Is the process running on the server or remotely? You
may want to try different locations, the other thing to try may be to (as a
test) reduce the width of the table you are propulating to see what effect
that has.

John

[quoted text, click to view]
AddThis Social Bookmark Button