| From: | Josh Berkus <josh(at)agliodbs(dot)com> |
|---|---|
| To: | Rhaoni Chiu Pereira <rhaoni(at)sistemica(dot)info> |
| Cc: | PostgreSQL ADMIN <pgsql-admin(at)postgresql(dot)org>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: [PERFORM] How to force an Index ? |
| Date: | 2003-09-18 17:50:34 |
| Message-ID: | 200309181050.34270.josh@agliodbs.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin pgsql-performance |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2003-09-18 18:02:10 | Re: How to force an Index ? |
| Previous Message | Chris White (cjwhite) | 2003-09-18 17:01:28 | Re: Testing for a record before update or insert without using a function. |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2003-09-18 17:53:57 | Re: Find one record |
| Previous Message | Josh Berkus | 2003-09-18 17:34:13 | Re: rewrite in to exists? |