pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Rotek <pavel.rotek@gmail.com>
To: pgsql-performance@postgresql.org
Subject: response time when querying via JDBC and via psql differs
Date: Mon, 25 Feb 2008 11:06:16 +0100
Message-ID: <3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com> (raw)

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

view thread (4+ messages)  latest in thread

Message-ID: <3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com>
Permalink:  ../3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com/
Also on:    postgresql.org/message-id/3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pavel.rotek@gmail.com
  Subject: Re: response time when querying via JDBC and via psql differs
  In-Reply-To: <3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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