Re: [PERFORM] String matching

2005-02-14 Thread Stephan Szabo
On Mon, 14 Feb 2005, Ivan Voras wrote: > Stephan Szabo wrote: > > On Mon, 14 Feb 2005, Ivan Voras wrote: > > >>Could you give me an example for this, or point me to the relevant > >>documentation? > > > > > http://www.postgresql.org/docs/8.0/interactive/indexes-opclass.html > > Thanks! I didn't kn

Re: [PERFORM] String matching

2005-02-14 Thread Ivan Voras
Stephan Szabo wrote: On Mon, 14 Feb 2005, Ivan Voras wrote: Could you give me an example for this, or point me to the relevant documentation? http://www.postgresql.org/docs/8.0/interactive/indexes-opclass.html Thanks! I didn't know this and I certainly didn't think it would be that easy :) -

Re: [PERFORM] String matching

2005-02-14 Thread Stephan Szabo
On Mon, 14 Feb 2005, Ivan Voras wrote: > Stephan Szabo wrote: > > > You can also create an index using a _pattern_ops operator > > class which should be usable even with other collations. > > Could you give me an example for this, or point me to the relevant > documentation? Basically, you could

Re: [PERFORM] String matching

2005-02-14 Thread Stephan Szabo
On Mon, 14 Feb 2005, Ivan Voras wrote: > PFC wrote: > > > > normally you shouldn't have to do anything, it should just work : > > > >> select field from table where field like 'abc%' > > > If it does not use the index, I saw on the mailing list that the > > locale could be an issue. > > O

Re: [PERFORM] String matching

2005-02-14 Thread Ivan Voras
Stephan Szabo wrote: You can also create an index using a _pattern_ops operator class which should be usable even with other collations. Could you give me an example for this, or point me to the relevant documentation? ---(end of broadcast)--- TIP 6

Re: [PERFORM] String matching

2005-02-14 Thread Ivan Voras
PFC wrote: normally you shouldn't have to do anything, it should just work : select field from table where field like 'abc%' If it does not use the index, I saw on the mailing list that the locale could be an issue. Oh yes, I forgot about that :( I do have LC_COLLATE (on latin2)... It's

Re: [PERFORM] String matching

2005-02-14 Thread PFC
normally you shouldn't have to do anything, it should just work : select field from table where field like 'abc%' CREATE INDEX ... ON table( field ); that's all If it does not use the index, I saw on the mailing list that the locale could be an issue. ---(end