Re: Index not being used in MAX function (7.2.3)

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Dann Corbit <DCorbit(at)connx(dot)com>
Cc: Jonathan Bartlett <johnnyb(at)eskimo(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, jim(at)nasby(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: Index not being used in MAX function (7.2.3)
Date: 2003-06-11 19:48:48
Message-ID: 20030611194848.GD17221@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 11, 2003 at 11:41:26 -0700,
Dann Corbit <DCorbit(at)connx(dot)com> wrote:
>
> Isn't that the optimizer's job to figure out? The whole idea of SQL is
> to abstract the queries and allow the optimizer to make all the smart
> choices about plans and stuff.

In theory yes. My comment was specifically addressing the idea of using
a macro. I don't think this would work because subselects aren't
always the best way to do this.

There are other areas where how you write queries makes a big difference
in performance even though the queries are logically equivalent.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-06-11 19:55:30 Re: pg_dump -> \i infile
Previous Message Tom Lane 2003-06-11 19:37:18 Re: Postgres performance comments from a MySQL user