Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dxU4T-0000Hq-NI for pgsql-performance@arkaria.postgresql.org; Thu, 28 Sep 2017 08:21:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dxU4T-0001qI-46 for pgsql-performance@arkaria.postgresql.org; Thu, 28 Sep 2017 08:21:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dxU2g-00072r-OY for pgsql-performance@postgresql.org; Thu, 28 Sep 2017 08:19:34 +0000 Received: from mail-wr0-x234.google.com ([2a00:1450:400c:c0c::234]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dxU2e-0003js-CH for pgsql-performance@postgresql.org; Thu, 28 Sep 2017 08:19:34 +0000 Received: by mail-wr0-x234.google.com with SMTP id v109so1240281wrc.1 for ; Thu, 28 Sep 2017 01:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=LBp4pNyIWauIqiF9HU0FoiHHHNn3LPtckj2yaE8fdp4=; b=njbJKfI+bIK5ftRDIhUgEN/jxgFvlTj3TujnhuGFzWHwO4dwPlrufOYzR2NWHwY6jP 5E20/TK8+S3CTtz+HBBQuCnOQvtlU8aQI/iCWvr81WyOPi8Q+kXAlhAT9UDf2eCdhm6A 3IjyBpk4pk5XwPLR7io/lRKfGtRwWqplZQojpQ8JhvqFkUbkpXE4GF6wfQcJ4bWBXkBe VMVGUFkexqeCYzRU1PzLevl11ayBbijOlsOHMfyhFoTP6qh452DXN0ibzjR/MQ6hTX4A BXi36J/rA63u2/NNnfDuii7/nYYUJt+OMKQfVDkQxu5NWEY40Mrf6ngd4UHSzBeGUDUh +TNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=LBp4pNyIWauIqiF9HU0FoiHHHNn3LPtckj2yaE8fdp4=; b=C77KJpbacRRPx+TmlUNXyX2dEcn4RlDv3NGE50nfSioyxjXXJCqcWb93b9mLo71yJz v0n9gZj1yCfH4GLDB1OM0Sr9CtzkhD9ArAvzMe7XQiPemS6cg/6RF7tSpd2aAjuh8i3I hGWxG+wz7uqpVQrAmXyuKxfs0b4kcRJExGy3HFxaeW+kvfBWfPhoImAv/jzLmYuhSmjC 4IlHWD5wOCWy76pc1o4+fewWuwudHbcCYJH0H1Gd9Ju2YNjyLMXX+2HIOa+B2QWCM6H3 IyzCffl9FjDm0LZQs5JubKz0AlbIOcpOVz++DD4U/UHKD+lxiRQB+YPYnMIZgwdBDJws Z9ug== X-Gm-Message-State: AHPjjUjiTdEEbj+ADocucyWi3bt4Ej+pg1lM3uVHrtfhWIPH/KSKfTLT Tp4CGBXP8L49L4NQV+WaIek7pY8KzjKrI4uH1Rk= X-Google-Smtp-Source: AOwi7QAAt6bz8RVq6dNQ2go8f9pHjOoNj/AW7IeqX9Tz33qqUC7KoyanZQNtpZdlhYB5eVoFKFLF07kLWIhVWqQ7QsY= X-Received: by 10.46.84.16 with SMTP id i16mr1675643ljb.60.1506586770609; Thu, 28 Sep 2017 01:19:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.235.85 with HTTP; Thu, 28 Sep 2017 01:19:30 -0700 (PDT) From: Subramaniam C Date: Thu, 28 Sep 2017 13:49:30 +0530 Message-ID: Subject: Slow query in JDBC To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary="f403045fb914491b63055a3b91cb" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --f403045fb914491b63055a3b91cb Content-Type: text/plain; charset="UTF-8" Hi When I try to execute the query from sql command line then that query is taking only around 1 sec. But when I execute the query using JDBC(Java) using preparedStatement then the same query is taking around 10 secs. Can you please let us know the reason and how to fix this issue? Thanks and Regards Subramaniam --f403045fb914491b63055a3b91cb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

When I try to execute the query from= sql command line then that query is taking only around 1 sec. But when I e= xecute the query using JDBC(Java) using preparedStatement then the same que= ry is taking around 10 secs.

Can you please let us= know the reason and how to fix this issue?

Thanks= and Regards
Subramaniam
--f403045fb914491b63055a3b91cb--