Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Full tablescans explain plans and indexes
Thiko! wrote:
> Hi
>
> Im trying to eliminiate full tablescans from 'top' sql querries on
our
> database system. I was led to believe that full table scans on very
> large tables was a big 'nono'.
>
> However, I'm finding that running Query 1 below only takes approx. 1
> second to execute when performaing a full table scan of table
> LAYOUTITEM with 292736 rows in it. After forcing the query to use
> indexe PK's of the tables involved it is taking up to 10 seconds
> longer! This is with using database hints. I don't "get it" as I
> thought index scans on large tables was the way forward ;)
>
> Please, if anyone has any advice please 'hint'.
>
> LayoutItem = 292736 rows
> LayoutGridItem = 4658 rows
> LayoutFormat = 163 rows
>
>
> Many thanks.
>
> Thiko!
>
>
> -- Query 1
>
> SELECT LayoutItem.*, LayoutGridItem.name GridName,
> LayoutFormat.usesStory, LayoutFormat.Name
> FormatName
> FROM LayoutItem, LayoutGridItem, LayoutFormat
> WHERE LayoutItem.LayoutGridItemID=LayoutGridItem.LayoutGridItemID
> AND LayoutItem.layoutFormatID=LayoutFormat.layoutFormatID (+) AND
> LayoutItem.LayoutID=21789
> ORDER BY rank ASC;
>
>
> ID PARENT_ID POSITION
> LPAD('',2*(LEVEL-1))||OPERATION||'('||OPTIONS||')'||OBJECT_NAME
> ---------- ---------- ----------
>
No Oracle version number, no operating system information. How many times must we ask for such information before people start posting it as habit?
Without the above mentioned data it's difficult to diagnose exactly what the 'issue' is. In some cases the presenece of an index isn't enough; current statistics must be kept, and, in some cases, histograms are necesary for proper optimiser decisions. You provide no insight as to the nature of your data except for the number of rows present in each involved table. And, as stated previously, you provide no Oracle release number nor operating system information; this makes it impossible to determine whether this is errant behaviour, requiring a patchset from Oracle, or your data, requiring better statistics and/or histograms.
Please provide the requested information so we can better answer your inquiry.
David Fitzjarrell Received on Thu Mar 31 2005 - 07:17:42 CST
![]() |
![]() |