Re: dimension table
From: Greg Rahn <greg_at_structureddata.org>
Date: Tue, 8 Dec 2009 17:38:00 -0800
Message-ID: <a9c093440912081738x5dbf9f41s3e9b55efbd29a6ca_at_mail.gmail.com>
When you make the predicate change, how did the execution plan change? That should help with knowing what plan you want.
> right now in the where clause of the query
> dim_Date.CALENDAR_DATE In ( '17-NOV-2008' )
> there was a index on the calender_date in dim_date . but the index on date
> column is not helping here.
> However when i changed it to dim_Date.date_key=100830 the query came out
> in few sec.
Date: Tue, 8 Dec 2009 17:38:00 -0800
Message-ID: <a9c093440912081738x5dbf9f41s3e9b55efbd29a6ca_at_mail.gmail.com>
When you make the predicate change, how did the execution plan change? That should help with knowing what plan you want.
Is dim_date.CALENDAR_DATE a varchar or date data type? If it's date, it should be cast as one using to_date.
On Tue, Dec 8, 2009 at 5:13 PM, Kar <kp0773_at_gmail.com> wrote:
>
> right now in the where clause of the query
> dim_Date.CALENDAR_DATE In ( '17-NOV-2008' )
> there was a index on the calender_date in dim_date . but the index on date
> column is not helping here.
> However when i changed it to dim_Date.date_key=100830 the query came out
> in few sec.
-- Regards, Greg Rahn http://structureddata.org -- http://www.freelists.org/webpage/oracle-lReceived on Tue Dec 08 2009 - 19:38:00 CST