Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tzLTn-0013VZ-Ab for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Mar 2025 20:11:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tzLTl-00BYed-1A for pgsql-hackers@arkaria.postgresql.org; Mon, 31 Mar 2025 20:11:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tzLTk-00BYeV-Ne for pgsql-hackers@lists.postgresql.org; Mon, 31 Mar 2025 20:11:28 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tzLTi-002IOw-1z for pgsql-hackers@lists.postgresql.org; Mon, 31 Mar 2025 20:11:28 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-30bee1cb370so43960741fa.1 for ; Mon, 31 Mar 2025 13:11:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743451885; x=1744056685; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IHcJRm3Gzp+XwXoxuaKPwS2584j/9WU5nfUgxJ/CLCY=; b=SdOzLr5LYJSIwTEOveqSW2Y1YsOshBlSukN+XqdoWDvX2hevJ9BtwyiINHhDng8sZH v/LgmIPTrh41KKjxJyvj6QLPdq8Ymdtr/WyQTH+Y/uANf20A/T61DcY409eFygf1pwmd zO6L7ub3dYWdwEXyIhcNydDUqCKEkznIjDtOvlNTU1IqVE11W/EJXSbsp3ERFS0M+J/U JI+dbhvWVwubx4ASRTeezi4mB6z0D6xltfNQJ8Tcfm2GjghJvrZuaqXk5vekpYtyaSWK cIMiVzWaypWaU/zIRG61waZeddNjZPln7M2EritYjvWIESKal8ttqSg/gMfZhxjglWKU VwPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743451885; x=1744056685; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IHcJRm3Gzp+XwXoxuaKPwS2584j/9WU5nfUgxJ/CLCY=; b=gH0Zh4ji5aTtc24f4DQch4Qn0WhEkqlxdhkEHAM8hL59hwER+X6JKw8WP/mXCX468p TnTY1jnwrlIVtRLiDZWJNSc94iqoXaaAUy42hGF1vXI0xovWwEutW6cS52wWmndMj0VM Cy6KkSosxOeMJ53/qbNxuAw/c6niRV4qdVdKE3blihm1lSb4eu79eEZ9LpvK9EQwRHOd HJm5Q9GwFOJ+/QqDCfgz2creOA1iQ41gSoEtpRUrNmQ9rJ00/06TvjtbdrYES902LOJG WsxZ4Wve+xRl71QSRhSgCDky6RLSPf12K4JeSAq5I1+WyUTEevVlMBmvQ70IvD2UuZyL f+Dg== X-Forwarded-Encrypted: i=1; AJvYcCWMG/KgWazPqW6go9ahJK00oGc0kN4Z7+FxUAa9AcNA404524ET9Hryt0ObWNVfraSPSzDM2sZVtN3Tlg4g@lists.postgresql.org X-Gm-Message-State: AOJu0Yx+A8AOffNJz5rj7+16WnkYrz7hN5cLu6U5lwkQTTN0jnxXy06r sq8e8K1j0ZE5+SwY+uDTFmqsdmkWaAw95rnipboj5BfuHrRo1dhK8KGVH8Gsz+xXQ0vMSRtUbBJ HUf3qNfobS6nJn2LZ9j9SLrPj35RV19pH X-Gm-Gg: ASbGncstCtWh7lMPGebBKtcjgdL8jvFlPqUQUH+YCTsij9JE3FiODnffdvoHHCOxWJX EJ0yMkzZM4cpqG5mzNlCdNYxDQL9tDIsLXhdU9yQhOTgVdbu/rfouOveBkqbopPRtvHt//Ioz5h oGngse9eCzUoagT4N5s0euOfisM/KMBK8ZH/qlKOUgaiDBoFzlAMrfPxcQ9Nri X-Google-Smtp-Source: AGHT+IGKzbRJ1E834Gmb27S3o57R3FArMlhcK7r4iSCie9aUDagDwDN44scgXOvee2YiPErdZLXtqYtlBWj6is9/8bU= X-Received: by 2002:a2e:a88a:0:b0:30d:b8a5:9b8d with SMTP id 38308e7fff4ca-30de024b448mr34072611fa.16.1743451885347; Mon, 31 Mar 2025 13:11:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Tue, 1 Apr 2025 09:11:13 +1300 X-Gm-Features: AQ5f1JocLuTbPQqgeJLj0a4wiJq_8CknaZusXzjZ2tNg9X-UB5yDd2SnD0sDm_M Message-ID: Subject: Re: pgsql: Add memory/disk usage for Window aggregate nodes in EXPLAIN. To: Christoph Berg Cc: Tatsuo Ishii , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 1 Apr 2025 at 04:40, Christoph Berg wrote: > - Storage: Disk Maximum Storage: NkB > + Storage: Memory Maximum Storage: NkB > -> Function Scan on generate_series a (actual time=N.N..N.N rows=N.N loops=N) We'll probably just need to bump that 2000 row count to something a bit more for 32-bit. Any chance you could share the output of: explain (analyze,buffers off,costs off) select sum(n) over() from generate_series(1,2000) a(n); Could you maybe also do a binary search for the number of rows where it goes to disk by adjusting the 2000 up in some increments until the Storage method is disk? (Not that I think we should set it to the minimum, but it would be good to not set it too much higher than we need to) David