pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Dominique Devienne <ddevienne@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Non-Stored Generated Columns
Date: Thu, 29 Feb 2024 13:24:55 +0100
Message-ID: <3c7e0de87eedeb66a127394202db8f12af36c424.camel@cybertec.at> (raw)
In-Reply-To: <CAFCRh--Er21oPSb3n_WanuKsgr0UGeS4dJ26bqip2yN_RUeWxg@mail.gmail.com>
References: <CAFCRh-_DodmoxMAS5r1sh9sAeAKDKReDiSKYH=rMLyEE3TpzQA@mail.gmail.com>
	<c634fdaa0e1795a6bf5fa6528a5750fc1c54c127.camel@cybertec.at>
	<CAFCRh-_2Pz0ZE9QH4gr9qYQW9bEFsnXefZxryJyeD-AgcOQAsg@mail.gmail.com>
	<2425903.1709147504@sss.pgh.pa.us>
	<CAFCRh--HTTob61MKzvi8NocOBoEECnOA=ZdR94tN6X=2KrSEig@mail.gmail.com>
	<dec069f5b59bb4565fbed5f4d8cb704c4c2fcdb5.camel@cybertec.at>
	<CAFCRh--Wf0ao2kDpqoDP_V_bDVCdnJE8YqDE52RR1Cf-0gwF1Q@mail.gmail.com>
	<e1cd5d6513d56c1005970eb6f333b5810de082a1.camel@cybertec.at>
	<CAFCRh--Er21oPSb3n_WanuKsgr0UGeS4dJ26bqip2yN_RUeWxg@mail.gmail.com>

On Thu, 2024-02-29 at 12:07 +0100, Dominique Devienne wrote:
> But I'm sure indexes on columns "not used at all in a statement" are eliminated early and easily/cheaply,
> w/o even getting into more complex consideration like statistics and co. Aren't they?

You may want a "SELECT count(*) FROM tab" to consider an index-only
scan on a small index, right?  I'm not saying that it is a large
overhead, but if you actually have dozens of indexes, it can
make processing slower.

Yours,
Laurenz Albe





view thread (14+ messages)

Message-ID: <3c7e0de87eedeb66a127394202db8f12af36c424.camel@cybertec.at>
Permalink:  ../3c7e0de87eedeb66a127394202db8f12af36c424.camel@cybertec.at/
Also on:    postgresql.org/message-id/3c7e0de87eedeb66a127394202db8f12af36c424.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, ddevienne@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Non-Stored Generated Columns
  In-Reply-To: <3c7e0de87eedeb66a127394202db8f12af36c424.camel@cybertec.at>
  References: <CAFCRh-_DodmoxMAS5r1sh9sAeAKDKReDiSKYH=rMLyEE3TpzQA@mail.gmail.com> <c634fdaa0e1795a6bf5fa6528a5750fc1c54c127.camel@cybertec.at> <CAFCRh-_2Pz0ZE9QH4gr9qYQW9bEFsnXefZxryJyeD-AgcOQAsg@mail.gmail.com> <2425903.1709147504@sss.pgh.pa.us> <CAFCRh--HTTob61MKzvi8NocOBoEECnOA=ZdR94tN6X=2KrSEig@mail.gmail.com> <dec069f5b59bb4565fbed5f4d8cb704c4c2fcdb5.camel@cybertec.at> <CAFCRh--Wf0ao2kDpqoDP_V_bDVCdnJE8YqDE52RR1Cf-0gwF1Q@mail.gmail.com> <e1cd5d6513d56c1005970eb6f333b5810de082a1.camel@cybertec.at> <CAFCRh--Er21oPSb3n_WanuKsgr0UGeS4dJ26bqip2yN_RUeWxg@mail.gmail.com> <3c7e0de87eedeb66a127394202db8f12af36c424.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox