Path: news.easynews.com!core-easynews!newsfeed1.easynews.com!easynews.com!easynews!newshosting.com!nx02.iad01.newshosting.com!news.cambrium.nl!news.cambrium.nl!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!news-out.ntli.net!newsrout1.ntli.net!news-in.ntli.net!ntli.net!newspeer1-win.ntli.net!newsfe3-gui.ntli.net.POSTED!53ab2750!not-for-mail
From: "Dave" <david.sharples3@ntlXworld.com>
Newsgroups: comp.databases.oracle.server
References: <vL_Gc.576$Ny6.1485@mencken.net.nih.gov> <C20Hc.476$em4.117@newsfe3-gui.ntli.net> <kj%Gc.577$Ny6.1552@mencken.net.nih.gov> <9g0Hc.495$em4.332@newsfe3-gui.ntli.net> <3s%Gc.578$Ny6.1570@mencken.net.nih.gov>
Subject: Re: Query not using indexes
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <jJ0Hc.558$em4.73@newsfe3-gui.ntli.net>
Date: Thu, 08 Jul 2004 00:39:43 GMT
NNTP-Posting-Host: 213.107.232.33
X-Complaints-To: http://www.ntlworld.com/netreport
X-Trace: newsfe3-gui.ntli.net 1089247183 213.107.232.33 (Thu, 08 Jul 2004 00:39:43 GMT)
NNTP-Posting-Date: Thu, 08 Jul 2004 00:39:43 GMT
Organization: ntlworld News Service
Xref: core-easynews comp.databases.oracle.server:225180
X-Received-Date: Wed, 07 Jul 2004 16:38:40 MST (news.easynews.com)


"hastenthunder" <hastenthunder@hotmail.com> wrote in message
news:3s%Gc.578$Ny6.1570@mencken.net.nih.gov...
>
> "Dave" <david.sharples3@ntlXworld.com> wrote in message
> news:9g0Hc.495$em4.332@newsfe3-gui.ntli.net...
> >
> > "hastenthunder" <hastenthunder@hotmail.com> wrote in message
> > news:kj%Gc.577$Ny6.1552@mencken.net.nih.gov...
> > >
> > > "Dave" <david.sharples3@ntlXworld.com> wrote in message
> > > news:C20Hc.476$em4.117@newsfe3-gui.ntli.net...
> > > >
> > > > "hastenthunder" <hastenthunder@hotmail.com> wrote in message
> > > > news:vL_Gc.576$Ny6.1485@mencken.net.nih.gov...
> > > > > Hi,
> > > > >
> > > > > A query of mine in Oracle 9i R2 chooses to perform a full table
scan
> > of
> > > 1
> > > > > million row instead of using the index.
> > > > > I'm using CBO and just computed the statistics for the table.
> > > > >
> > > > > Can someone help?
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > >
> > > > exec
> > dbms_stats.gather_table_stats('SCHEMA_NAME','TABLE_NAME,casacde=true)
> > > >
> > > > are you sure a fts is a bad thing -
> > > >
> > > >
> > >
> > > Done that.  Computed fresh statistics before sending the issue out via
> > > analyze table command (its old, I know).
> > > Just did it again using dbms_stats, still does not work...
> > > Strange.., the query certainly access a substantial number of rows....
> > >
> > >
> >
> > if you are getting most of the rows back, fts is good
> >
> > see
> >
>
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4433887271030
> >
> >
>
> Thanks Dave, you are right.
> However, I'm only getting a single row back (out of 1 million).
>
> SELECT fieldA
> FROM tableA
> WHERE fieldB = 'xxx'
>
> And fieldB is indexed.
> Seems like a very simple query, with fresh statistis.
> That's why this is puzzling me so much....
>
>

try hinting thr query, make sure your index is valid and ok

a well formed valid hint will be taken


