Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DB3552E0074 for ; Mon, 25 Feb 2008 06:06:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 98843-02 for ; Mon, 25 Feb 2008 06:06:18 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by postgresql.org (Postfix) with ESMTP id 1650B2E0046 for ; Mon, 25 Feb 2008 06:06:17 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d37so2942056pye.29 for ; Mon, 25 Feb 2008 02:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=L+sM2cUZyoOHv5kiwsnisEom8ikHmRoiNRv4m/F0iKw=; b=grHlszLu/8rraQKeGlizmKvJi2K/o6/2wQdyzC9dqtBKLr/XnSmY7jVCtwdG0tTXCMbeWYhx1M+dn8o35/1EJ8BjZz629z2aL59dkz3ZfiUIHmXKBfCANGSqY+pB1iQHhzdASxYJsfuIpjvUS1UH1ZMCj1wwSBaK9l/N1tJQydI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=TNP00bfFJuUMVwlsA18gAV9PI3Agm9IF6GMeRF+bOrKogEDW99HHtYNgrP9N10Yw5JNOun/1lrXXYjL55eMwDdLombUCxuhM89s1XgTCCDM9N0QOPpIWNlcw55HgCvYO8xRTr2DlV8PxBce8kKRQhg+2KmnPTH1B9kHUBirHJdo= Received: by 10.65.132.13 with SMTP id j13mr6116075qbn.5.1203933976494; Mon, 25 Feb 2008 02:06:16 -0800 (PST) Received: by 10.64.3.7 with HTTP; Mon, 25 Feb 2008 02:06:16 -0800 (PST) Message-ID: <3556c08c0802250206w1668aaday51dc9be9fddd7b70@mail.gmail.com> Date: Mon, 25 Feb 2008 11:06:16 +0100 From: "Pavel Rotek" To: pgsql-performance@postgresql.org Subject: response time when querying via JDBC and via psql differs MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_7514_4977235.1203933976491" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200802/315 X-Sequence-Number: 28857 ------=_Part_7514_4977235.1203933976491 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_7514_4977235.1203933976491 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_7514_4977235.1203933976491--