Re: Why Does Query Require Table Access
From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 30 Jan 2009 20:35:48 -0000
Message-ID: <9cGdndBEkbQ_-R7UnZ2dnUVZ8sTinZ2d_at_bt.com>
Date: Fri, 30 Jan 2009 20:35:48 -0000
Message-ID: <9cGdndBEkbQ_-R7UnZ2dnUVZ8sTinZ2d_at_bt.com>
"Shakespeare" <whatsin_at_xs4all.nl> wrote in message news:49832466$0$183$e4fe514c_at_news.xs4all.nl...
>
> Would Oracle be so clever to avoid to read the table when one uses:
> trunc(business_date) = to_date(....)?
>
Unfortunately not. But you might expect things to behave very nicely if you had a constraint with for condition - especially if you also declare business_date to be non-null. Unfortunately that doesn't work either, although 11g is a little tidier about what it does than 9i.
-- Regards Jonathan Lewis http://jonathanlewis.wordpress.com Author: Cost Based Oracle: Fundamentals http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html The Co-operative Oracle Users' FAQ http://www.jlcomp.demon.co.uk/faq/ind_faq.htmlReceived on Fri Jan 30 2009 - 14:35:48 CST