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:

[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

[PERFORM] Optimizing SQL: bind variables, prepared stms, histograms

2004-01-23 Thread lnd
A few question regarding PostgreSQL handling of queries: - Is each query submitted parsed and planned even if it is identical to a query submitted before? For example, 10 queries "select * from animals where id=:b1" with possibly different bind variable :b1 values will be fully processed (parse