From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | "Jouneau Luc" <Luc(dot)Jouneau(at)diamant(dot)jouy(dot)inra(dot)fr> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Seq scan with a like operator |
Date: | 2004-07-23 16:00:07 |
Message-ID: | 200407231800.07825.peter_e@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Am Freitag, 23. Juli 2004 17:24 schrieb Jouneau Luc:
> I didn't notice it when I red the doc, but if I create the index as
> specified then it is the query with equal operator which use a seq scan.
> Do I have to create 2 indexes on the same column (with different datatype)
> in order to support different kind of queries ?
Yes.
> Well, It seems quite strange to me :
> Suppose you have an user interface in which user can parameter his query on
> 4 varchar fields (independantly, i.e field 4 does not need to have field
> 1,2 or 3 filled), and you allow to use generic character such as '*' or '?'
> (which will be translated into '%' and '_'). User can also fill in exact
> values.
I think that kind of interface would use the LIKE operator no matter whether
the user entered wildcards or not.
> It would also mean that support both exact generic queries double the
> indexing task on update/insert/delete.
Well, if you want to optimize lots of different queries, the system needs to
provide lots of different support.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
From | Date | Subject | |
---|---|---|---|
Next Message | Eduardo S. Fontanetti | 2004-07-23 16:49:17 | Re: Conversion de MDB a Postgres |
Previous Message | Jouneau Luc | 2004-07-23 15:24:31 | Re: Seq scan with a like operator |