The join is not too bad when joining the indexed secondary field(x.inv_id = aud.inv_id) - it does use the index, but on the point where you put criteria for INF_Action_type in Update, Insert for the second table - x - it full scan again. It has an index and it uses it for AUD table, but not for...
there are about 1.5 mln rows but the total returns are about 20% - I thought about that if there's more then 50% retunrs the full scan will be cheaper and it'll be used.
The optimizer behaves like there's more then 50% back...
Sure, on this one, also on all join fields - inf_id, group_id and one on Project_id. But you are right - the x.inf_action_type is the one to make the full table scan.
How can I prevent the full scan for the x.action_type aud.actiontype uses the index.
Thanks a lot,
MJ
I have a query which joins the table to itself - this bring the cost too high because all the time it brings full table scan for the self join - the number of the records to pull are not more then 20% of the table.Even if I put a hint a specific index the optimizer do not want to use it. How can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.