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 1lIv0g-00067o-2t for pgsql-performance@arkaria.postgresql.org; Sun, 07 Mar 2021 15:07:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lIv0e-0003Cm-UN for pgsql-performance@arkaria.postgresql.org; Sun, 07 Mar 2021 15:07:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lIv0e-0003Cf-L1 for pgsql-performance@lists.postgresql.org; Sun, 07 Mar 2021 15:07:56 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lIv0W-00067R-OU for pgsql-performance@lists.postgresql.org; Sun, 07 Mar 2021 15:07:56 +0000 Received: by mail-pl1-x629.google.com with SMTP id u18so3642434plc.12 for ; Sun, 07 Mar 2021 07:07:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XFSkebLFLFbSdOHj1RGX2rwVe9pQakqKDBIvvI+b84I=; b=dQW5vlqYnhXgwQY3CU+f2hza90y1onpCOG8sYJx89okrHiYZW9ztHJqiNIG4XyqEIc oMFFpI/322OmVOOF3nmQig9T+RwXJeNy8w95x1Wy4ey8dWUrb0wUavdOSS9Fya9PKjjV PPWVrDEbKefCtpKoLZGzhk3xGXW1Z+yN7HEJTo/Z7up594n0ju4QSgsrAmNmmuf3Uwpr YKIEV+qboWxM+LKmurGpf12nDA8epJMM3hsmFX3gkn20IOAQQZbGlpSPdFeVQEjQ45xI uoowuCmpsJlXalzAfIR9IwsGgUz/Er1qYLUpsKMpAJxAmb+mKygy+yiTcw0/XfY+VbFK BLCA== 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:in-reply-to; bh=XFSkebLFLFbSdOHj1RGX2rwVe9pQakqKDBIvvI+b84I=; b=oGu6fMM2bpr3gZ8M4CKFv1YeXsqhgR47H9zegUzlxgohGvvNYtkL+3Dm1/MbWAU6VK s2FFcVZnzOuxC/KKDFXveA0SdmJZLj3k4LVFaMl+WHww3nstszPavYb1bUNG+VP4ajV9 oR+YcRRldaxCpiJDtHKgcWmZVQg49oTlBMFvxFiOta+nILDB0m56NHMlJFo4nqso/wWk MK1DVMoUrdRKrYqB8uxX5qx4Oby84jElD5SWWVzzAgxtJnUGym1mwZtJr+WWpCw8wJjw F2Le8QpVsgEC9gmul+ugmzrYQxGQDIVsWTMf8E9kvgiB5O6XgyccxqZ0qllhnhpDzy4W ny5w== X-Gm-Message-State: AOAM531UPO80jzccInhL8m6KjjsHC/1Ej+eNekQNpJ8Z3UhPHMlIDl04 23wsYbLf3sBvoXc5nk9/c+Q= X-Google-Smtp-Source: ABdhPJw6YmLF11lgEMa9MyRzCW4O2YLZXYDt+TW6Q82lE9p+7GBuT24rbZGYiz4Behq+Wx9sLtKfbw== X-Received: by 2002:a17:902:904b:b029:e5:5cc5:877d with SMTP id w11-20020a170902904bb02900e55cc5877dmr17360651plz.50.1615129665832; Sun, 07 Mar 2021 07:07:45 -0800 (PST) Received: from nol (2001-b011-0008-9697-4686-f9ea-c206-7335.dynamic-ip6.hinet.net. [2001:b011:8:9697:4686:f9ea:c206:7335]) by smtp.gmail.com with ESMTPSA id z2sm4617379pfq.198.2021.03.07.07.07.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Mar 2021 07:07:45 -0800 (PST) Date: Sun, 7 Mar 2021 23:08:18 +0800 From: Julien Rouhaud To: Michel SALAIS Cc: 'Francesco De Angelis' , pgsql-performance@lists.postgresql.org Subject: Re: different execution time for the same query (and same DB status) Message-ID: <20210307150818.hiqv26pmrovi3ced@nol> References: <00ce01d71361$4dd83750$e988a5f0$@msym.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00ce01d71361$4dd83750$e988a5f0$@msym.fr> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Mar 07, 2021 at 03:51:05PM +0100, Michel SALAIS wrote: > > Have you tried to use EXPLAIN ANALYZE at least? > > It could give valuable information about why this is occurring. +1, and more generally please follow https://wiki.postgresql.org/wiki/Slow_Query_Questions.