From: Bruno Wolff III <bruno@wolff.to>
To: John A Meinel <john@arbash-meinel.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: linux@alteeve.com
Cc: tgl@sss.pgh.pa.us
Cc: tobias@nordicbet.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Index ot being used
Date: Mon, 13 Jun 2005 10:48:34 -0500
Message-ID: <20050613154834.GA9203@wolff.to> (raw)
In-Reply-To: <42AD9D8D.9060503@arbash-meinel.com>
References: <s2ad532e.099@gwmta.wicourts.gov>
<42AD9D8D.9060503@arbash-meinel.com>
On Mon, Jun 13, 2005 at 09:51:57 -0500,
John A Meinel <john@arbash-meinel.com> wrote:
>
> I don't know if there are specific reasons why not, other than just not
> being implemented yet. It might be tricky to get it correct (for
> instance, how do you know which columns can be added, which ones will be
> constant) Perhaps you could just potentially add the WHERE items if they
> have an equality constraint with a constant. But I'm guessing there are
> more cases than that where the optimization could be performed.
I think there is already some intelligence about which expressions are
constant in particular parts of a plan.
I think you need to be able to do two things. One is to drop constant
expressions from order by lists. The other is when looking for an index
to produce a specific ordering, to ingore leading constant expressions
when comparing to the order by expressions.
> Also, the more options you give the planner, the longer it takes on
> average to plan any single query. Yes, it is beneficial for this use
> case, but does that balance out slowing down all the other queries by a
> tiny bit.
But there aren't that many possible indexes, so I don't expect this will
slow things down much more than the current check for potentially useful
indexes.
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: bruno@wolff.to, john@arbash-meinel.com, Kevin.Grittner@wicourts.gov, linux@alteeve.com, tgl@sss.pgh.pa.us, tobias@nordicbet.com
Subject: Re: Index ot being used
In-Reply-To: <20050613154834.GA9203@wolff.to>
* 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