On Sat, 14 Oct 2000, Muhammad Alsebaeyie wrote:
> I have a small database set up on a local TCP/IP network Linux server,
> bandwidth is 10 MBit/s. I have a table X of around 6000 records( about
> 1.5MB) . On querying this table from either JDBC with database pooling
> or Zeos database explorer (or interactive PGSQL) from a win98 machine,(
> as simple as select * from X), the query is VERY slow, it may take up
> to 15 mins. to execute. Eventhough psql executes it in afew seconds,
> both local from the linux server and using telnet from another machine.
> I vacuum the database regularly, and I have 2 versions of this table,
> one with 3 indices and one with only 1 index on the primary key. they
> both have the same problem. Any Ideas Why this Happens?
The problem with the current implementation of ResultSet is that it reads
the entire result into memory. Now this is the same to how libpq does it
(what psql uses), but Java suffers from having to convert all this data
from bytes into chars, and this is a major overhead.
Gunnar has recently done some work in optimising some of the overhead
being used, and it's in the cvs source if you want to try it.
If you have Java2 (JDK1.2 or later) there's a pre-beta binary on my web
I've not done any testing of the current source from Windows yet, but when
we go into beta I'll be testing it from Win9x, ME, NT & 2K as well as
Peter T Mount peter(at)retep(dot)org(dot)uk http://www.retep.org.uk
PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
Java PDF Generator http://www.retep.org.uk/pdf/
In response to
pgsql-interfaces by date
|Next:||From: Enrico Comini||Date: 2000-10-17 19:48:40|
|Subject: Double mail|
|Previous:||From: Tom Lane||Date: 2000-10-17 19:00:42|
|Subject: Re: 2 computers 1hd 2 postgres daemons. Is it possible? |