pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedunreasonably slooooow query on small table from JDBC & Zeos
2+ messages / 2 participants
[nested] [flat]
* unreasonably slooooow query on small table from JDBC & Zeos
@ 2000-10-14 17:48 Muhammad Alsebaeyie <shipmaster@acm.org>
2000-10-17 19:11 ` Re: unreasonably slooooow query on small table from JDBC & Zeos Peter Mount <peter@retep.org.uk>
0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Alsebaeyie @ 2000-10-14 17:48 UTC (permalink / raw)
To: pgsql-interfaces
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?
M. Alsebaeyie
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: unreasonably slooooow query on small table from JDBC & Zeos
2000-10-14 17:48 unreasonably slooooow query on small table from JDBC & Zeos Muhammad Alsebaeyie <shipmaster@acm.org>
@ 2000-10-17 19:11 ` Peter Mount <peter@retep.org.uk>
0 siblings, 0 replies; 2+ messages in thread
From: Peter Mount @ 2000-10-17 19:11 UTC (permalink / raw)
To: Muhammad Alsebaeyie <shipmaster@acm.org>; +Cc: 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
site.
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
Linux.
Peter
--
Peter T Mount peter@retep.org.uk http://www.retep.org.uk
PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
Java PDF Generator http://www.retep.org.uk/pdf/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2000-10-17 19:11 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-10-14 17:48 unreasonably slooooow query on small table from JDBC & Zeos Muhammad Alsebaeyie <shipmaster@acm.org>
2000-10-17 19:11 ` Peter Mount <peter@retep.org.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox