Re: [PERFORM] Explain plan for 2 column index : timestamps and time zones

2004-01-30 Thread lnd
> From: Tom Lane [mailto:[EMAIL PROTECTED] > My guess is that the original SQL was > WHERE ... date_from = current_timestamp > This should be > WHERE ... date_from = localtimestamp > if timestamp without tz is the intended column datatype. Thank you. The problem was exactly this:

Re: [PERFORM] Explain plan for 2 column index

2004-01-29 Thread Tom Lane
Richard Huxton <[EMAIL PROTECTED]> writes: >> Index Scan using testtab_name_date_from on testtab (cost=0.00..2.01 >> rows=1 width=18) >> Index Cond: ((name)::text = 'name1'::text) >> Filter: ((date_from)::timestamp with time zone = >> ('now'::text)::timestamp(6)with time zone) > What types are th

Re: [PERFORM] Explain plan for 2 column index

2004-01-29 Thread Richard Huxton
On Thursday 29 January 2004 19:29, [EMAIL PROTECTED] wrote: > I have 2 columns index. > The question is if optimizer can use both columns of an index or not, Should do. > i.e. the plan should read like this: > > Index Cond: > ((name)::text = 'name1'::text) > AND ((date_from)::ti

[PERFORM] Explain plan for 2 column index

2004-01-29 Thread lnd
I have 2 columns index. The question is if optimizer can use both columns of an index or not, i.e. the plan should read like this: Index Cond: ((name)::text = 'name1'::text) AND ((date_from)::timestamp with time zone= ('now'::text)::timestamp(6) with time zone) Whilst