From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joseph Shraibman <jks(at)selectacast(dot)net> |
Cc: | pgsql general list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: like performance w/o wildcards. |
Date: | 2003-08-03 22:28:04 |
Message-ID: | 1723.1059949684@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Joseph Shraibman <jks(at)selectacast(dot)net> writes:
> I notice in 7.3.3 the planner can't tell when a LIKE has no wildcards
> and is in reality an '='. Is this an easy change to make?
On what do you base that conclusion?
regression=# create table t1 (f1 text unique);
NOTICE: CREATE TABLE / UNIQUE will create implicit index 't1_f1_key' for table 't1'
CREATE TABLE
regression=# explain select * from t1 where f1 like 'foo';
QUERY PLAN
---------------------------------------------------------------------
Index Scan using t1_f1_key on t1 (cost=0.00..4.82 rows=1 width=32)
Index Cond: (f1 = 'foo'::text)
Filter: (f1 ~~ 'foo'::text)
(3 rows)
regression=#
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2003-08-03 22:49:54 | Re: Monthly table partitioning for fast purges? |
Previous Message | Vernon Smith | 2003-08-03 21:58:11 | Re: Inheritance & multiple-value fields |