sql using full table scan instead of an index
From: ryan <ryanbobko_at_yahoo.com>
Date: 31 Oct 2003 08:38:41 -0800
Message-ID: <29c46df8.0310310838.16ea7773_at_posting.google.com>
Date: 31 Oct 2003 08:38:41 -0800
Message-ID: <29c46df8.0310310838.16ea7773_at_posting.google.com>
An explain plan shows that this query always does a FTS on CHILD, and I can't really see why. I guess I don't really understand the optimizer well, but it would seem like a FTS isn't necessary because of the index on CHILD.pkey. In fact, if I change the * to just CHILD.pkey, the index is used as expected.
This is in Oracle 9.2.0.3. Both tables and all their indices have been analyzed, and CHILD has approximately 1M rows in it, while PARENT has about 200K. The whole thing's running on Windows 2000.
I'd appreciate any insights you may have, ry Received on Fri Oct 31 2003 - 17:38:41 CET