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] "Vivek" wrote:
> 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 ?
>
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] "John Bell" wrote:
> 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
>
> "Vivek" wrote:
>
> > 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 ?
> >
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] "Vivek" wrote:
>
> 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
>
> "John Bell" wrote:
>
> > 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
> >
> > "Vivek" wrote:
> >
> > > 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 ?
> > >
Don't see what you're looking for? Try a search.