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 1tD2yH-00FQfS-7H for pgsql-general@arkaria.postgresql.org; Mon, 18 Nov 2024 14:43:21 +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 1tD2yE-005M3G-IJ for pgsql-general@arkaria.postgresql.org; Mon, 18 Nov 2024 14:43:19 +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.94.2) (envelope-from ) id 1tD2yE-005M37-1S for pgsql-general@lists.postgresql.org; Mon, 18 Nov 2024 14:43:18 +0000 Received: from mail.thenautilus.net ([178.162.154.203]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tD2yB-002X21-Bn for pgsql-general@lists.postgresql.org; Mon, 18 Nov 2024 14:43:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=thenautilus.net; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=20240114; bh=tgorJkO6 HBP9lh1BPhEysX6YUsauw9qEbIGrHP5n2+U=; b=QNHYzBCf6iPjt3PALqCr5Mua KzvUs7aWhWGtUG6rMAgemB3XqnOW9jNkbRxQCrCT0BkV+zI9XUdR54FjBFVANoen mcwDlbUQ4v6VJL3eLy/4zdpsDqlgJH3Zpng9Di5dbca347SYT/jSl2NBq2A1+R8S Hvk/wSdjQAgmkyyA3SXV4+t2rvcJ3iay2zCU/I0Q4gMTtPcbpeQfIYTprfEj7zCX RaC1aWJvVu9jr6pRXaD7VfVz/7khIV216GprJ5toDd8MANImuFx1TjLhbQlVI3Nf 3NHGZKIqluzHvSox6RJfLM4Rjh9T5BvcwPsuIko4+g5nTabxXUEiEHCDXLOHhQ== Received: (qmail 19850 invoked from network); 18 Nov 2024 14:43:12 -0000 Received: from unknown (HELO exelion) (dakkar@2001:1af8:4700:a096:2:8000::1006) by 0 with ESMTPA; 18 Nov 2024 14:43:12 -0000 Date: Mon, 18 Nov 2024 14:43:07 +0000 From: Gianni Ceccarelli To: pgsql-general@lists.postgresql.org Subject: Re: Functions and Indexes Message-ID: <20241118144307.2017e712@exelion> In-Reply-To: <8dfd0bd5-87e5-4de7-9f60-8a680a32bc11@evolu-s.it> References: <2e36a2fe-b30f-46a5-937f-3b7d94e75cb6@evolu-s.it> <8dfd0bd5-87e5-4de7-9f60-8a680a32bc11@evolu-s.it> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 18 Nov 2024 15:37:57 +0100 Moreno Andreo wrote: > If a column appears in the WHERE clause (and so it should be placed > in index), in case it is "processed" in a function (see below), is it > possible to insert this function to further narrow down things? You probably want to look at https://www.postgresql.org/docs/current/indexes-expressional.html -- Dakkar - GPG public key fingerprint = A071 E618 DD2C 5901 9574 6FE2 40EA 9883 7519 3F88 key id = 0x75193F88