Re: [PERFORM] index over timestamp not being used

2007-07-25 Thread Mario Weilguni
Am Dienstag 24 Juli 2007 schrieb Tom Lane: I thought the to_char/to_date/to_timestamp functions were intented for this purposes No, they're intended for dealing with wacky formats that the regular input/output routines can't understand or produce. Really? I use them alot, because of

Re: [PERFORM] index over timestamp not being used

2007-07-25 Thread Ansgar -59cobalt- Wiechers
On 2007-07-25 Mario Weilguni wrote: Am Dienstag 24 Juli 2007 schrieb Tom Lane: I thought the to_char/to_date/to_timestamp functions were intented for this purposes No, they're intended for dealing with wacky formats that the regular input/output routines can't understand or produce.

[PERFORM] index over timestamp not being used

2007-07-24 Thread Arnau
Hi all, I've got the following two tables running on postgresql 8.1.4 transactions Column |Type | Modifiers --+-+--- transaction_id| character varying(32) | not null

Re: [PERFORM] index over timestamp not being used

2007-07-24 Thread Tom Lane
Arnau [EMAIL PROTECTED] writes: timestamp_in | timestamp without time zone | default now() SELECT ... FROM transactions t LEFT OUTER JOIN statistics s ON t.transaction_id = s.transaction_id WHERE t.timestamp_in = to_timestamp('20070101', 'MMDD') GROUP BY date,

Re: [PERFORM] index over timestamp not being used

2007-07-24 Thread Arnau
Hi Tom, Alternatively, do you really need to_timestamp at all? The standard timestamp input routine won't have any problem with that format: t.timestamp_in = '20070101' This is always I think I'm worried, what happens if one day the internal format in which the DB stores the

Re: [PERFORM] index over timestamp not being used

2007-07-24 Thread Tom Lane
Arnau [EMAIL PROTECTED] writes: Alternatively, do you really need to_timestamp at all? The standard timestamp input routine won't have any problem with that format: t.timestamp_in = '20070101' This is always I think I'm worried, what happens if one day the internal format in which the DB