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 1lSh59-0006Kr-Ie for pgsql-performance@arkaria.postgresql.org; Sat, 03 Apr 2021 14:16:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lSh56-00054D-N7 for pgsql-performance@arkaria.postgresql.org; Sat, 03 Apr 2021 14:16:56 +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 1lSh56-000543-Bh for pgsql-performance@lists.postgresql.org; Sat, 03 Apr 2021 14:16:56 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lSh53-0007vG-Hh for pgsql-performance@lists.postgresql.org; Sat, 03 Apr 2021 14:16:55 +0000 Received: by mail-il1-x133.google.com with SMTP id u2so6764925ilk.1 for ; Sat, 03 Apr 2021 07:16:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Z4rxVbyFb2xOCTT1ZdlcmW8AK77SUII/bQeY/AgFjws=; b=YYjy1eGmq5Z3ddwk4YgPipUTOLU+DyY/Fiq3jJCCc9C1j/n4dgSyOo2Mf6SrUqQx0k 9Dz6lIwquQ5VmkckEnrYC0KoGz1TX/9TpL+u2J/j7/U5kPUvrrtrCjOKyXHay4/zQjo9 eq/THw6hJZX7cbb767CNIg3OLnMxLeHjdJwhsCJSOUbg+v3qAOpS9oLnl1XkIwREqg+t +0/KNI1crRUFvSPvRRDC32LPB0g9qn9OJ0EVJgdCNV9mUeIoOL2Z9iC01PemAzGJ7ql5 1hiSdRXtoRMHKriiuufUM6hmZl8N3LvInJ/imV20Yjo4EKTLUpK4BIVovJVJu6G5qJqP HrsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Z4rxVbyFb2xOCTT1ZdlcmW8AK77SUII/bQeY/AgFjws=; b=jaOkqzQlKP4TM4xFNNX99aQXp9gqFCxCpupIWnQB0NZVd0RB0wlIn+FXOZ3ATEOqmo Vj6JPCLkKa3pYZndQNkoKz/75StZGoWc75RBIAn2GB2cyXydaaK7akAaNXEowscVrUYs mQ7z4zUYcwlTzn3JM9YHt/PNyx8jkfEV/kNyIdN+zgKqAjOCbMNmq8iYW6FG+qY8OfXK 6e1mTn1WWgDgqYzIYsxstSqVya2grfPHIwplDUCexGrn1GPwZGrQZK7b2uEq4tMo7PrU DKaVchtbeSM3QhhF+KE7TOAqJ/jXAJiXnimDmLXK+RnY3QousM18MHtAp2/i4Jqex6wn 54gw== X-Gm-Message-State: AOAM53284uHhcTF5l8CN11TA4HUuqlc799rPaVAKuzUffTYSpHUY2cMB hxyH50uju9AVjmBdrQKqIq8HqA== X-Google-Smtp-Source: ABdhPJz565coG+6fqWvoyjv9Vw7sdCEBu7zAFwka+RUHqHYSi9p+aEuAjBhZDP/o5IE4AsTHStElaw== X-Received: by 2002:a92:6a0b:: with SMTP id f11mr14107940ilc.211.1617459412849; Sat, 03 Apr 2021 07:16:52 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id p5sm7489391iod.31.2021.04.03.07.16.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Apr 2021 07:16:52 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 9634E800DE8; Sat, 3 Apr 2021 09:16:51 -0500 (CDT) Date: Sat, 3 Apr 2021 09:16:51 -0500 From: Justin Pryzby To: Pavel Stehule Cc: aditya desai , pgsql-performance@lists.postgresql.org Subject: Re: SELECT Query taking 200 ms on PostgreSQL compared to 4 ms on Oracle after migration. Message-ID: <20210403141651.GI6592@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sat, Apr 03, 2021 at 04:08:01PM +0200, Pavel Stehule wrote: > so 3. 4. 2021 v 15:38 odesílatel aditya desai napsal: > > "Gather (cost=1000.43..1002.75 rows=1 width=127) (actual > > time=174.318..198.539 rows=1 loops=1)" > > " Workers Planned: 1" > > " Workers Launched: 1" > > " Single Copy: true" > > " -> Index Scan using address1_i7 on address1 dom (cost=0.43..2.65 rows=1 > > width=127) (actual time=0.125..0.125 rows=1 loops=1)" > > " Index Cond: (address_key = 6113763)" > > "Planning Time: 0.221 ms" > > "Execution Time: 198.601 ms" > > You should have broken configuration - there is not any reason to start > parallelism - probably some option in postgresql.conf has very bad value. > Second - it's crazy to see 200 ms just on interprocess communication - > maybe your CPU is overutilized. It seems like force_parallel_mode is set, which is for debugging and not for "forcing things to go faster". Maybe we should rename the parameter, like parallel_mode_testing=on. http://rhaas.blogspot.com/2018/06/using-forceparallelmode-correctly.html -- Justin