On 02/09/2003 20:22 Tom Lane wrote:
> Fernando Nasser <fnasser@redhat.com> writes:
> > So the psql program reads data and spits it out (to /dev/null, which is
> fast)
> > every row it reads.
>
> > The JDBC driver has to store all these rows in memory and wait for you
> > to tell it what you want to do with it.
>
> But libpq also stores the entire query result in memory. That doesn't
> seem like a reason for JDBC to be slower.
Speaking as Java programmer (as well a long-time C programmer), you'd be
amazed/shocked just how much memory a Java program can burn (take the
hidden malloc usage of (s/f)printf and magnify it a few orders of
magnitude). The problem with OO programmers is that they seem have even
less understanding of how computers work that even COBOL programmers do.
Basically, I think Joseph's test program does more to stress his
computer's memory management than it tests PostgreSQL. And I think most
people on this list realize that JDBC will always be slower than a C
and/or assembler interface. That said and speaking as a Java/web
developer, I find the PostgreSQL JDBC to be fast enough for real life
applications.
regards
--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants |
http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+---------------------------------------------+