Re: Forcing query to use an index - Mailing list pgsql-sql

From Michael Nachbaur
Subject Re: Forcing query to use an index
Date
Msg-id 17BEC416-4DDD-11D7-90E0-000A27935D5A@nachbaur.com
Whole thread Raw
In response to Re: Forcing query to use an index  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
On Monday, Mar 3, 2003, at 15:32 US/Pacific, Josh Berkus wrote:
> Check out the thread: Re: [SQL] OUTER JOIN with filter
> in today's list; this relates to your problem.  Then try your query as:

I'll read through this, thank you.

>   LEFT OUTER JOIN (SELECT * FROM Customer_Month_Summary
>     WHRE CMS.MonthStart = DATE '2003-02-01'
>        ) CMS ON C.ID = CMS.CustomerID

This works beautifully!  Thanks.

> This set of expressions has "seq scan" written all over it.   I hihgly 
> suggest
> that you try to find a way to turn these into anchored text searches, 
> perhaps
> using functional indexes on lower(column).

Hmm, I'll have to give this one some thought, since it looks like there 
won't be any easy way to index those text columns, since the text I'm 
searching for could be anywhere within the column.

Thank you everyone for all the help!



pgsql-sql by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Forcing query to use an index
Next
From: Greg Stark
Date:
Subject: Re: Forcing query to use an index