Hello, I my query a View is used. This View references 2 tables. However when i take tha eplan for this Query i notice that the Primary key indexes on both thse tables are not being used. How can i get around this problem?
posted 13 years ago
I could not respond to this question because I need more info. Is it on Oracle ? Is it a inner join = or an outer join =(+)? You speak of primary key but do you have foreign key ? Are your indexes created correctly ? ...
Sajee, I know that several DBMSs -- including Oracle and IBM DB2 (latest versions) -- contain "query optimizers". Depending on the way they are configured, they may rewrite the query you enter, in order to maximize its efficiency. Sometimes, it is more efficient for a query to do a "full table scan" than to use the index. Hence, it is quite reasonable to see a query plan that does not use indexes. Some people say that if a query will return at least 15% of a table's entire rows, then it should not use the index. Hope this has helped you. Good Luck, Avi.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads