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

response time when querying via JDBC and via psql differs

From: "Pavel Rotek" <pavel(dot)rotek(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: response time when querying via JDBC and via psql differs
Date: 2008-02-25 10:06:16
Message-ID: 3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Hi all,

  i have strange problem with performance in PostgreSQL (8.1.9). My problem
shortly:

  I'm using postgreSQL via JDBC driver (postgresql-8.1-404.jdbc3.jar) and
asking the database for search on table with approximately 3 000 000
records.
  I have created functional index table(lower(href) varchar_pattern_ops)
because of lower case "like" searching. When i ask the database directly
from psql, it returns result in 0,5 ms, but when i put the same command via
jdbc driver, it returns in 10 000 ms. Where can be the problem?? Any problem
with PostgreSQL tuning??

The command is
select df.id as id, df.c as c, df.href as href, df.existing as existing,
df.filesize as filesize from documentfile df where (lower(href) like
'aba001!_2235800001.djvu' escape '!' ) order by  id limit 1   Thank you very
much for any help,

  Kind regards,

  Pavel Rotek

Responses

pgsql-performance by date

Next:From: Markus BertheauDate: 2008-02-25 11:10:32
Subject: Re: response time when querying via JDBC and via psql differs
Previous:From: Joel StevensonDate: 2008-02-25 07:09:30
Subject: Re: LISTEN / NOTIFY performance in 8.3

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