Re: "reverse()" on strings

Поиск
Список
Период
Сортировка
От h012@ied.com
Тема Re: "reverse()" on strings
Дата
Msg-id no.Yo.N.nN.0208280400360.20016-100000@business.com
обсуждение исходный текст
Ответ на Re: "reverse()" on strings  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-sql
Jeff & Josh, thanks for showing me a solution !
  John


PS: just curious: is there anything I can do to affect effectiveness of 
the cache, when ISCACHABLE is used ? (I.e. size / expiring algorithm, or 
order of inputs - E.g. when building the index, is there anything that 
would order the inputs first, to maximize cache hit/miss ratio, such as 
"CREATE INDEX extension_idx ON file (reverse(name)) ORDER BY name" ?

On Mon, 26 Aug 2002, Josh Berkus wrote:

> Jeff, h012,
> 
> > CREATE FUNCTION fn_strrev(text) returns text as '
> > return reverse($_[0])
> > ' language 'plperl' with (iscachable);
> 
> If you make that "WITH (ISCACHABLE, ISSTRICT)" the index will be faster to 
> update on columns which contain large numbers of NULLs.  "ISSTRICT" refers to 
> the fact that if the function receives a NULL, it will output a NULL, and 
> thus saves the parser the time running NULLs through the function.
> 
> Also, remember to use this index, you'll have to call the exact same function 
> in your queries.
> 
> 

-- 
-- Gospel of Jesus is the saving power of God for all who believe --              ## To some, nothing is impossible. ##
                  http://Honza.Vicherek.com/
 





В списке pgsql-sql по дате отправления:

Предыдущее
От: "Gaetano Mendola"
Дата:
Сообщение: unsubscribe
Следующее
От: "Roger Mathis"
Дата:
Сообщение: signed/unsigned integers