freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Thompson, Bill D (London)" <ThompBil AT exchange.uk.ml.com>
- To: "'freetds AT lists.ibiblio.org'" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] tds_convert speed
- Date: Mon, 10 Feb 2003 13:04:54 -0000
Hi,
James mentioned that we had a different method of converting money types to
char, that was backed out because it didn't work on little endian clients.
I reckon I know what the problem was with this.
If someone could compile the following program on a little endian box and
send me the output, it would help confirm my analysis:
#include <stdio.h>
main() {
long long myll;
char *p;
int i;
myll = 4294967296;
for (p = (char *) &myll, i = 0; i < 8; i++, p++) {
printf("%02x", *p);
}
printf ("\n");
}
thanks,
Bill
> -----Original Message-----
> From: James K. Lowden [SMTP:jklowden AT schemamania.org]
> Sent: 09 February 2003 01:43
> To: TDS Development Group
> Subject: [freetds] tds_convert speed
>
> All,
>
> I added a unit test src/tds/unittests/convert.c. It tests every datatype
> conversion possible (subject to tds_willconvert). If you give it a
> parameter (which "make check" will not do), it runs the conversion that
> number of times, and computes iterations/second.
>
> Below is how we do converting to varchar. This is significant for bcp
> performance if you use the -c switch to write/read text data files.
>
> Also, we fail in 10 (other) cases. These are cases where we return
> TDS_CONVERT_NOAVAIL -- which I take to mean "we can't do that" -- even
> though tds_willconvert() returns true.
>
> --jkl
>
> $ make convert && ./convert 1 2>err \
> |grep interations \
> |grep 'varchar\.' \
> |sort -n \
> ; grep fail err
>
> `convert' is up to date.
> 174 interations/second converting numeric => varchar.
> 329 interations/second converting decimal => varchar.
> 5128 interations/second converting money => varchar.
> 62602 interations/second converting binary => varchar.
> 62602 interations/second converting datetime => varchar.
> 66576 interations/second converting image => varchar.
> 91181 interations/second converting smalldatetime => varchar.
> 99864 interations/second converting real => varchar.
> 99864 interations/second converting tinyint => varchar.
> 99864 interations/second converting long long => varchar.
> 110376 interations/second converting int => varchar.
> 110376 interations/second converting float => varchar.
> 110376 interations/second converting smallint => varchar.
> 111848 interations/second converting smallmoney => varchar.
> 142180 interations/second converting bit => varchar.
> 167772 interations/second converting char => varchar.
> 167772 interations/second converting text => varchar.
> failed (-2) to convert 45 (binary, 7 bytes) : 108 (numeric).
> failed (-2) to convert 45 (binary, 7 bytes) : 106 (decimal).
> failed (-2) to convert 45 (binary, 1 bytes) : 50 (bit).
> failed (-2) to convert 34 (image, 7 bytes) : 108 (numeric).
> failed (-2) to convert 34 (image, 7 bytes) : 106 (decimal).
> failed (-2) to convert 34 (image, 1 bytes) : 50 (bit).
> failed (-2) to convert 108 (numeric, 35 bytes) : 60 (money).
> failed (-2) to convert 108 (numeric, 35 bytes) : 122 (smallmoney).
> failed (-2) to convert 106 (decimal, 35 bytes) : 60 (money).
> failed (-2) to convert 106 (decimal, 35 bytes) : 122 (smallmoney).
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] tds_convert speed,
James K. Lowden, 02/08/2003
- <Possible follow-up(s)>
-
RE: [freetds] tds_convert speed,
Thompson, Bill D (London), 02/10/2003
- Re: [freetds] tds_convert speed, Steve Langasek, 02/10/2003
- RE: [freetds] tds_convert speed, ZIGLIO Frediano, 02/10/2003
- RE: [freetds] tds_convert speed, Thompson, Bill D (London), 02/10/2003
- RE: [freetds] tds_convert speed, ZIGLIO Frediano, 02/10/2003
-
RE: [freetds] tds_convert speed,
Thompson, Bill D (London), 02/10/2003
- Re: [freetds] tds_convert speed, James K. Lowden, 02/10/2003
- RE: [freetds] tds_convert speed, Lowden, James K, 02/10/2003
- RE: [freetds] tds_convert speed, Thompson, Bill D (London), 02/10/2003
Archive powered by MHonArc 2.6.24.