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.96) (envelope-from ) id 1vmocv-00GZFv-04 for pgsql-general@arkaria.postgresql.org; Mon, 02 Feb 2026 07:45:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vmoct-00Cndm-0V for pgsql-general@arkaria.postgresql.org; Mon, 02 Feb 2026 07:45:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vmocs-00Cndd-2U for pgsql-general@lists.postgresql.org; Mon, 02 Feb 2026 07:45:39 +0000 Received: from sm-r-013-dus.org-dns.com ([84.19.1.232]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vmocq-000000009hI-1jvY for pgsql-general@lists.postgresql.org; Mon, 02 Feb 2026 07:45:38 +0000 Received: from smarthost-dus.org-dns.com (localhost [127.0.0.1]) by smarthost-dus.org-dns.com (Postfix) with ESMTP id 0E02CA03BF for ; Mon, 2 Feb 2026 08:45:33 +0100 (CET) Received: by smarthost-dus.org-dns.com (Postfix, from userid 1001) id 00807A03E6; Mon, 2 Feb 2026 08:45:32 +0100 (CET) X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_05,DKIM_INVALID, DKIM_SIGNED,DMARC_PASS,HTML_MESSAGE,KAM_INFOUSMEBIZ,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 Received: from ha01s018.org-dns.com (ha01s018.org-dns.com [62.108.32.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smarthost-dus.org-dns.com (Postfix) with ESMTPS id 22D04A03BF for ; Mon, 2 Feb 2026 08:45:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gelassene-pferde.biz; s=default; t=1770018332; bh=OzLVMzyJhU8g5y7pLSTzMWXM2PVslpFmEh4Xip+0q0Y=; h=From:To:Subject; b=xy+gQBjR4fVVohXkU2zupXB1Ds5pU5jEdIAfZuRa1QIyws5B+CDUMAdhoVc8EcG8K ADjwF8V5A/bV2mZT0JYa2TlERFBocFGbkARnrvuQU2jBJrBOSvwGvwCcJzfjvxiIfV IHH0WewiOhkThcRRKkF+Ggqk20T2G5pVBE3f+Ki0= Authentication-Results: ha01s018.org-dns.com; spf=pass (sender IP is 178.197.230.21) smtp.mailfrom=thiemo@gelassene-pferde.biz smtp.helo=dummy.faircode.eu Received-SPF: pass (ha01s018.org-dns.com: connection is authenticated) Date: Mon, 2 Feb 2026 08:45:31 +0100 From: Thiemo Kellner To: pgsql-general@lists.postgresql.org Message-ID: <444efcf3-845b-424e-8311-0bd29ad9d9e1@gelassene-pferde.biz> In-Reply-To: References: <63F54040-608A-4ED4-A23C-E6767FF87088@gmail.com> Subject: Re: Top -N Query performance issue and high CPU usage MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3_139367495.1770018331826" X-Correlation-ID: <444efcf3-845b-424e-8311-0bd29ad9d9e1@gelassene-pferde.biz> X-PPP-Message-ID: <177001833259.2997925.13413183013125601700@ha01s018.org-dns.com> X-PPP-Vhost: gelassene-pferde.biz X-POWERED-BY: wint.global - AV:CLEAN SPAM:OK List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_3_139367495.1770018331826 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Would it do any good to restrict the transaction date for the limit to something like "current timestamp - 1 day/hour/month". How about partitioning? My two dimes Thiemo ------=_Part_3_139367495.1770018331826 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi

Would it do any good to restrict the transaction date for the limit to something like "current timestamp - 1 day/hour/month". How about partitioning?

My two dimes

Thiemo
------=_Part_3_139367495.1770018331826--