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 1mYst9-0008IW-Rs for pgsql-performance@arkaria.postgresql.org; Fri, 08 Oct 2021 16:38:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYst8-0003zK-B9 for pgsql-performance@arkaria.postgresql.org; Fri, 08 Oct 2021 16:38:26 +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 1mYst7-0003zC-WB for pgsql-performance@lists.postgresql.org; Fri, 08 Oct 2021 16:38:26 +0000 Received: from mail-qt1-x82d.google.com ([2607:f8b0:4864:20::82d]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mYst4-0000Pa-V9 for pgsql-performance@lists.postgresql.org; Fri, 08 Oct 2021 16:38:25 +0000 Received: by mail-qt1-x82d.google.com with SMTP id z24so5324862qtv.9 for ; Fri, 08 Oct 2021 09:38:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=/KbvS/Ezcta18dSWs3VkADA2d3mz1Nw3lcNclc6UPuY=; b=midoS4lrQ8WCY1VtZRZ/74gA1I4otYv3k65j8s00GwCQycB9OFHg7J0SY06xUQrtSI F9qLeVpY3EK8C27XDaBUWg08WLwesy2/Mw2rMWoPJ2JaxC/YBRIs0WBI8szFGNBJfRsh dlxfOAXLtPyuTE46MGOpKYG54Mr7Qxqe07X0quGP8L7cQ30JekKHfS1B8l6E3uHR9f0F IyJ+n8ybDddq6fK+b/xxfomrf42V8zfPqNJTVv8NIdH03zHVuEmb43SR0EFjWP2newSI TaOT658bgjUsn9AqWF9H1OB4LnWtNVV8w6pOWWDv7/cL/cY21sIoqo1QrDuMiFBMQUWK lgIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=/KbvS/Ezcta18dSWs3VkADA2d3mz1Nw3lcNclc6UPuY=; b=77utfIZa9nhE5Cx0PsjlW4bOlrs2MYbwfKphJNbuqbwtSrMosXF7HtxK5sx9PRxJzw lFgFZB3yoxbTnW3gfHRkb8KDAywosuiS8otNEvnyhLP6tkFQ/buw0E7/iflhA2HwWVRk 0Ep3Rr0A3R6ehTMO9QJQsLfp4ZnWzMYRKfqyOOGV48ZWolGz4xScWnM9vgi8MMi/x3aG x/nmNpgkRPQ7rPw/r5w06vLjMMEP2neSwj+ns9uLjgiaJ0F07K/lpagspjhpnKcojud6 +xZFC060QNLII3TlTjDkupGUpyDBaQ90jvntfRGFuRoktgMJljbyajDNoEG2AbgRebiM sCsg== X-Gm-Message-State: AOAM532J1M1wGCfT+mtCGWTq/m00BmfvJa+YAaUIE/B21CCyHLtC6waF /IhqvvPiO58uG7tpSp2rQyc= X-Google-Smtp-Source: ABdhPJwhIdYWEii0TYwSq7BA+dSJUJYwiWDMsU+JUyVAK/pXon76c5Uf/s6PMVCCCx5Ll/paSvJYng== X-Received: by 2002:ac8:6112:: with SMTP id a18mr12723428qtm.401.1633711100183; Fri, 08 Oct 2021 09:38:20 -0700 (PDT) Received: from [192.168.2.100] (pool-72-79-19-93.nwrknj.east.verizon.net. [72.79.19.93]) by smtp.gmail.com with ESMTPSA id h2sm2529631qkf.106.2021.10.08.09.38.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Oct 2021 09:38:19 -0700 (PDT) Message-ID: <66181837-54c8-e3a5-e650-c789a4ffe29e@gmail.com> Date: Fri, 8 Oct 2021 12:38:19 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: Better, consistent instrumentation for postgreSQL using a similar API as Oracle Content-Language: en-US To: Bruce Momjian Cc: pgsql-performance@lists.postgresql.org References: <4d9e6ac5-5b13-84fe-74b5-07421501318e@gmail.com> <20211008152132.GB31533@momjian.us> From: Mladen Gogala In-Reply-To: <20211008152132.GB31533@momjian.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/8/21 11:21, Bruce Momjian wrote: > Ah, this is exactly what I wanted to know --- what people are using the > event waits for. Can you tell if these are done all externally, or if > they need internal database changes? Well, the methodology goes like this: we get the slow queries from pgBadger report and then run explain (analyze, timing, buffers) on the query. If we still cannot figure out how to improve things, we check the events and see what the query is waiting for. After that we may add an index, partition the table, change index structure or do something like that. Unrelated to this discussion, I discovered Bloom extension. Bloom indexes are phenomenally useful. I apologize for the digression. -- Mladen Gogala Database Consultant Tel: (347) 321-1217 https://dbwhisperer.wordpress.com