Re: Best Fit SQL query statement - Mailing list pgsql-sql

From hubert depesz lubaczewski
Subject Re: Best Fit SQL query statement
Date
Msg-id 20070811090644.GA5255@depesz.com
Whole thread Raw
In response to Re: Best Fit SQL query statement  ("Rodrigo De León" <rdeleonp@gmail.com>)
List pgsql-sql
On Fri, Aug 10, 2007 at 08:13:46PM -0500, Rodrigo De León wrote:
> On 8/10/07, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> > unfortunatelly this query will be hard to optimize.
> 
> Uh, how about
> 
> SELECT MAX(t1)
>   FROM t1
>  WHERE '9849' LIKE t1 || '%';

it will not help much as the main burden is the where clause, which is
not indexable.

depesz

-- 
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)


pgsql-sql by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: Trigger Procedure Error: NEW used in query that is not in a rule
Next
From: Andreas Joseph Krogh
Date:
Subject: Re: Index usage in order by with multiple columns in order-by-clause