On Wed, Jul 21, 2010 at 11:10 AM, Bill Zakrzewski <bill@xxxxxxxxxxxx> wrote: > All - > > Oracle 10.2.0.4.0 > RH Linux 5.3 > > I have a query that contains a subquery. When I run the subquery as a > standalone it completes in less than 2 minutes, but the full query takes > over 2 hours and ATTR_CODE is a small table. The first thing I noticed was > that when I run the subquery as a standalone it uses partition pruning for > the incidentkey table, but when incorporated as a subquery it does not. FYI > - it is partitioned on IN_DATE - one partition for each year. Any thoughts > for why this is happening or how I can force it to use the partitioning? > > > It would probably be beneficial to see the execution plan for both queries. Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com