Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK51H-000468-Tc for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 17:20:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK51G-0003Is-09 for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 17:20:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK51F-0003Ho-LV for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 17:20:01 +0000 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gK51D-0003rd-Fl for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 17:20:01 +0000 Received: by mail-ot1-x329.google.com with SMTP id t5so8524183otk.1 for ; Tue, 06 Nov 2018 09:19:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=CkGFy7MnxDdKh1NWedyFyPXsiSpKaNfML2YUxgtPDxw=; b=BOVVfVm3MoQR8GRXlSeEfNBY8SjFMuQN/pOqC9BwSbOzW0jvQFJKskCtwa/gAdE/ea g8+PX2qiGN6N2MO7uA48R3uugsv4QiQzUcA2xKH3s4xGxpZExrAsn4tupeJLQXvRRQLa YOdY+ItI364f2MGP5GkhfpjE4fD0StUS4fccQUqKKdYQ8AJK0ZviQhCNxtLJsXstMQY1 JUKJQMtJmRXdhHq6UKjEYXVygroiXC+3H+IfkaAlUb6YmfCO8BWBx4wIgNnTwFSmpK1a 4+pyE5GWKzg7y/0pB9kpjUegoZMQR0rk1+r9wNURDCg0IEcHHGf51DF0Ob1gJdpBI6dT KiTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=CkGFy7MnxDdKh1NWedyFyPXsiSpKaNfML2YUxgtPDxw=; b=Ko+3rpA90e+qg6BSzoMOthCQ8MtYzKXsiwMh08Sn1Y+nkVzMegQ71thOZqyeoT+RFA LLqGR9+EfiPffAzLC3pb1UIy9AAWGI8SZ459aXMbW924gIdiK2W+RsELYuenqJLF6cof uR9+xFwXjiTDaom/JzLrAI4GvTMJixJDlMuF8PfnRZXcyZsvbbEMt6jJQHpfVB1250wv NzAILR5levwQYgwM+HDFU70Rdd/6KbeDFTXj/JNRQOjH9TudrHNIxw7nN48KLUfVJhNR bYsmqAgxOUCmZ0LugZcLZTHJ7s9W5adNquQkB9suB4UZnlbEOqXh/RhVm4Yp+hAP0EOt 1wmg== X-Gm-Message-State: AGRZ1gI2q91Wng5IAULMewaXOzYPRkirdoDOHmvfHReVOHZihBxzFYM4 O7uWXJjGYAMC+OFI22GgiWqNMHuj X-Google-Smtp-Source: AJdET5exrJETNx9OGd1Kl/D/4EGuP/SsOhfkYf8GTE8pQ4NEIe1o90soOAc6Gk8HVTsOrjNNw7A1Pw== X-Received: by 2002:a9d:42c:: with SMTP id 41mr1921665otc.41.1541524796800; Tue, 06 Nov 2018 09:19:56 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id l71-v6sm1075175oih.34.2018.11.06.09.19.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Nov 2018 09:19:55 -0800 (PST) Subject: Re: why select count(*) consumes wal logs To: pgsql-general@lists.postgresql.org References: <653931906.1147337.1541523848244.ref@mail.yahoo.com> <653931906.1147337.1541523848244@mail.yahoo.com> From: Ron Message-ID: <4e7dda1e-b37c-32eb-4605-721473154082@gmail.com> Date: Tue, 6 Nov 2018 11:19:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------09325E9BB4B6F49920F44924" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------09325E9BB4B6F49920F44924 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/06/2018 11:12 AM, Michael Nolan wrote: > On Tue, Nov 6, 2018 at 11:08 AM Ravi Krishna > wrote: > > PG 10.5 > > I loaded 133 million rows to a wide table (more than 100 cols) via COPY. > > > It's always a good idea after doing a large scale data load to do a vacuum > analyze on the table (or the entire database.) > I understand the need to ANALYZE (populate the histograms needed by the dynamic optimizer), but why VACUUM (which is recommended after updates and deletes). Thanks -- Angular momentum makes the world go 'round. --------------09325E9BB4B6F49920F44924 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 11/06/2018 11:12 AM, Michael Nolan wrote:
On Tue, Nov 6, 2018 at 11:08 AM Ravi Krishna <srkrishna1@aol.com> wrote:
PG 10.5

I loaded 133 million rows to a wide table (more than 100 cols) via COPY.

It's always a good idea after doing a large scale data load to do a vacuum analyze on the table (or the entire database.)


I understand the need to ANALYZE (populate the histograms needed by the dynamic optimizer), but why VACUUM (which is recommended after updates and deletes).

Thanks

--
Angular momentum makes the world go 'round.
--------------09325E9BB4B6F49920F44924--