| From: | hubert depesz lubaczewski <depesz(at)depesz(dot)com> |
|---|---|
| To: | Rodrigo De León <rdeleonp(at)gmail(dot)com> |
| Cc: | Fernando Hevia <fhevia(at)ip-tel(dot)com(dot)ar>, Kiran <kumar(dot)m(dot)kiran(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Best Fit SQL query statement |
| Date: | 2007-08-11 09:06:44 |
| Message-ID: | 20070811090644.GA5255@depesz.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)depesz(dot)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)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andreas Joseph Krogh | 2007-08-11 09:22:08 | Re: Index usage in order by with multiple columns in order-by-clause |
| Previous Message | Pavel Stehule | 2007-08-11 08:16:47 | Re: Trigger Procedure Error: NEW used in query that is not in a rule |