Re: [PERFORM] How to force an Index ?

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: [PERFORM] How to force an Index ?
Дата
Msg-id 200309181050.34270.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: [PERFORM] How to force an Index ?  (Rhaoni Chiu Pereira <rhaoni@sistemica.info>)
Список pgsql-admin
Rhaoni,

>  ... gsames00.ano_mes = to_char(ftnfco00.data_emissao,'YYYYMM') AND ...

>    Then it uses the gsames00 index instead of a SeqScan 'cuz it is
> camparing same data type, but .. I don't want to create this function 'cuz
> this aplication is used with Oracle too.

You should have said that earlier ....

> I need to know if there is a way to set the to_char output to varchar
> instead of text !

Did you try:

... gsames00.ano_mes = (to_char(ftnfco00.data_emissao,'YYYYMM')::VARCHAR) AND
...


--
Josh Berkus
Aglio Database Solutions
San Francisco

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

Предыдущее
От: Gustavo Pérez
Дата:
Сообщение: varchar too long strange problem
Следующее
От: Alumne FIB - GUSTAVO PEREZ QUEROL
Дата:
Сообщение: Re: dump among different versions of postgreSQL