Re: Index on a COALESCE function

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Mark Steben <msteben(at)autorevenue(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Index on a COALESCE function
Date: 2007-07-16 20:12:26
Message-ID: 886237.78443.qm@web31813.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

--- Mark Steben <msteben(at)autorevenue(dot)com> wrote:

> select 45198705,false,id,next_avail_senddate(id,date(send_date)) from
> (select
> id,timeclause_combine(date(estmileage_timeclause(service_date,mileage,last_s
> ervice_date,last_mileage,
> date_of_purchase,year_purchased,10750,cid,serindex_date,id)),
> date(date_larger(date(coalesce(date_of_purchase,
> '1900-01-01')+timespan('45 days')),
> date(service_date+timespan('44 days')))),
> date(null),date(create_date),9,false) as send_date,last_send

IIUC, indexs are only used in JOINS and WHERE conditions. I don't see either of those in your
query.

Regards,
Richard Broersma Jr.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message De Leeuw Guy 2007-07-16 20:22:33 Re: cache problem (v2)
Previous Message Mark Steben 2007-07-16 19:57:30 Index on a COALESCE function