Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnxWp-0006sr-V9 for pgsql-admin@arkaria.postgresql.org; Wed, 24 Jun 2020 05:00:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jnxWn-0003d7-MV for pgsql-admin@arkaria.postgresql.org; Wed, 24 Jun 2020 05:00:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnxWn-0003cy-EY for pgsql-admin@lists.postgresql.org; Wed, 24 Jun 2020 05:00:53 +0000 Received: from mx2.vit.de ([45.9.85.13]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jnxWh-0003Kp-CN for pgsql-admin@postgresql.org; Wed, 24 Jun 2020 05:00:52 +0000 Received: from localhost (localhost [127.0.0.1]) by mx2.vit.de (Postfix) with ESMTP id 04F28206AF for ; Wed, 24 Jun 2020 07:00:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mx2.vit.de Received: from mx2.vit.de ([127.0.0.1]) by localhost (mx2.vit.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uCq4OpGRgE6n for ; Wed, 24 Jun 2020 07:00:43 +0200 (CEST) Received: from nuc4475.vit.de (nuc4475.vit.de [172.16.6.175]) by mx2.vit.de (Postfix) with ESMTP for ; Wed, 24 Jun 2020 07:00:43 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by nuc4475.vit.de (Postfix) with ESMTP id A3555CE0760 for ; Wed, 24 Jun 2020 07:00:43 +0200 (CEST) To: Pgsql-admin From: Jessica Holle Subject: Performance of SELECT directly and from application Message-ID: <404eece7-44b3-bbb4-177a-ff955d10e7e6@vit.de> Date: Wed, 24 Jun 2020 07:00:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: de-DE List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, we use PostgreSQL 12.3.1 and have a little bit trouble with performance. When the statement comes from the application (wildfly) duration is about 24982.819 ms. When I do the statement directly with psql duration is 967.773 ms. Duration from Wildfly is known becaue we use in postgresql.conf "log_min_duration_statement = 5000". There I see, that from application are 3 variables used. Is there any idea why this can happen or a hint to solve this issue? Kind regards, Jessica