From: | Daniel Migowski <dmigowski(at)ikoffice(dot)de> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Oliver Jowett <oliver(at)opencloud(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Kris Jurka <books(at)ejurka(dot)com> |
Subject: | Re: TypeInfoCache |
Date: | 2007-12-27 08:40:02 |
Message-ID: | 477364E2.2010808@ikoffice.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hello, dear JDBC mailing list members,
At first I hope you all had a merry christmas. Regarding the patch I
sent, another important argument is this one: I createt a benchmark for
getCharacterStream vs. getStream running on a table with a varchar(50)
and a text column, each containing 50 chars of data. These are the
benchmarks for the differences of calling 1000 times the given function
on a Core2Duo 2Ghz and JDK1.5:
getString on text_col took 8.27384ms
getCharacterStream on text_col took 14.26489ms
Factor: 1.724095462324628
getString on varchar_col took 9.57153ms
getCharacterStream on varchar_col took 12.76733ms
Factor: 1.3338860140437319
Please note only the getString() vs.
getCharacterStream()+creatingAString are benchmarked, not the DB
connection itself (which is the real bottleneck). And please note only
those applications that really use getCharacterStream are a bit slower,
but as I explained in my previous mails, they do it for a good reason.
Conclusion: There is no real performance loss even in the worst case
(which should never occur anyway), so please accept my patch. I wish you
all a happy new year!
With best regards,
Daniel Migowski
Attachment | Content-Type | Size |
---|---|---|
StringVsStreamTest.java | text/plain | 2.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2007-12-27 09:01:55 | Re: TypeInfoCache |
Previous Message | Andrew Lazarus | 2007-12-26 03:49:24 | Re: concat returns null |