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 1neYTN-0007jX-8U for pgsql-performance@arkaria.postgresql.org; Wed, 13 Apr 2022 08:35:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1neYSN-000737-9T for pgsql-performance@arkaria.postgresql.org; Wed, 13 Apr 2022 08:34:31 +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 1neYSM-00072y-Sd for pgsql-performance@lists.postgresql.org; Wed, 13 Apr 2022 08:34:30 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1neYSJ-0005xs-VR for pgsql-performance@postgresql.org; Wed, 13 Apr 2022 08:34:29 +0000 Received: by mail-ej1-x632.google.com with SMTP id bg10so2448101ejb.4 for ; Wed, 13 Apr 2022 01:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=29+l5Kad0k1x9hC0P4CSKM2oMAbK7zhUsEV32A2sj8I=; b=mMolFFkAUzp+kj5vJQ5LvA1GyUqb2Q0S6uu61fjH/J4KNFQU7+MS2givutg0GzRGEc 2NZH3Qay0LaDv9jYEEtgAKy+6Qw/PlSVe7AIBl4e1wnczcVv/nup2kPvAEjDX6K+Gog9 7551cK5c15J+rmvr6evYq40JLJi76LhG+YP7LnKk3RIANXd/nhgT3zfmdlc6TXO+XWB9 KKqdsdjrAfwGeYOgYlC507eHRo+/TF85c3CUsfvsjfsbedIzTC9jRKgOo/vVHlzW/c3E 1zuDTZ+pqEPT/dotYnj/GBPi/etzkxHaRCTZVP7bWxFJwDxnkYy3PacOR35AA8x4x6Fs 141Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=29+l5Kad0k1x9hC0P4CSKM2oMAbK7zhUsEV32A2sj8I=; b=HNSVb2FMta6rvWLapJ34r0L2hOiz1h7pbxlxgtCuCTkXjml9pwe9/SxLKfSRtI8K67 si4hkrGt7jRDAmF28a3GZl6EfPdE2DjvwW6Vis+7oZ62QLpC1sIm2uMtCcy5nCAzjQl8 v40ev0ZV3ItftbWMP80vMLBMZ4b6pKIU9DdE1aCyRlG++v3LQRLzX0YH8vWjSiZv4awN 15+FvTsALz+x+RmisFIHdlWiae5XD9P1t3d1nNU8jo6yGoGav36Lx6GsiHp1maXatG0x kafwwhDUsd94WTtbG3ZXW/e4UvWFZdMv6tCV5Qls6no/ASmsD1DFL79prSTyayDBw8la h33w== X-Gm-Message-State: AOAM531EJgsm02QeJ2pt74S47Oy15pwAm8cER88DWHDnTeq1ePgH2kQO pCh5SsFn4BBKWVRzIRzbIhvYLA== X-Google-Smtp-Source: ABdhPJzpM/VVFClrbchje/5LRu8yaTATu2Uzz1qQpl/mvL6/Rg2zeXUZr89fUKj51dXbVBM3/5ftKg== X-Received: by 2002:a17:907:1c14:b0:6e8:ba5e:dbd9 with SMTP id nc20-20020a1709071c1400b006e8ba5edbd9mr4945536ejc.480.1649838865708; Wed, 13 Apr 2022 01:34:25 -0700 (PDT) Received: from localhost.localdomain ([2001:871:5e:598:857b:a04f:3078:93e0]) by smtp.gmail.com with ESMTPSA id h1-20020a50e101000000b0041cdb91ef08sm922137edl.38.2022.04.13.01.34.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 01:34:25 -0700 (PDT) Message-ID: <4ae8501377e4ba5155cfee5e6eaca3fe674f7f98.camel@cybertec.at> Subject: Re: Performance for SQL queries on Azure PostgreSQL PaaS instance From: Laurenz Albe To: "Kumar, Mukesh" , "pgsql-performance@postgresql.org" , MUKESH KUMAR Date: Wed, 13 Apr 2022 10:34:24 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-3.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2022-04-12 at 09:10 +0000, Kumar, Mukesh wrote: > We have recently done the migration from Oracle Database Version 12C to Azure > PostgreSQL PaaS instance version 11.4 and most of the application functionality > testing has been over and tested successfully >   > However, there is 1 process at application level which is taking approx. 10 mins > in PostgreSQL and in oracle it is taking only 3 mins. >   > After investigating further we identified that process which is executed from > application end contains 500 to 600 no of short SQL queries into the database. > We tried to run the few queries individually on database and they are taking > less than sec in Postgres Database to execute, and we noticed that in Oracle > taking half of the time as is taking in PostgreSQL. for ex . in oracle same > select statement is taking 300 millisecond and in PostgreSQL it is taking > approx. 600 millisecond which over increases the execution of the process. >   > Oracle Database are hosted on ON- Prem DC with dedicated application server on > OnPrem and same for PostgreSQL. How can a database hosted with Microsoft be on your permises? Apart from all other things, compare the network latency. If a single request results in 500 database queries, you will be paying 1000 times the network latency per request. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com