Skip site navigation (1) Skip section navigation (2)

Re: unreasonably slooooow query on small table from JDBC & Zeos

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: Muhammad Alsebaeyie <shipmaster(at)acm(dot)org>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: unreasonably slooooow query on small table from JDBC & Zeos
Date: 2000-10-17 19:11:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Sat, 14 Oct 2000, Muhammad Alsebaeyie wrote:

> Hi,
> 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
PostgreSQL JDBC Driver
Java PDF Generator

In response to

pgsql-interfaces by date

Next:From: Enrico CominiDate: 2000-10-17 19:48:40
Subject: Double mail
Previous:From: Tom LaneDate: 2000-10-17 19:00:42
Subject: Re: 2 computers 1hd 2 postgres daemons. Is it possible?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group