Hi All,
I have on single line query. i alway see this query fired
on my database.this query fetch single column and cpu cost is too high 1637557 and cost is only 26.this query is fired reguarly.
what will be better way to deal with this query.
Printable View
Hi All,
I have on single line query. i alway see this query fired
on my database.this query fetch single column and cpu cost is too high 1637557 and cost is only 26.this query is fired reguarly.
what will be better way to deal with this query.
Try re-writing the query. What is the optimizer mode? Are the tables involved analyzed?
What is the query? something likeorCode:select username from dual;
Code:select sysdate from dual;
select code12 from m_s12 where flnt402 =:1 order by code12
this the query that is taking cpu cost is too high 1637557 and cost is 26.
what we can do with this.
what u suggest me to do.
What's the explain plan, how many rows is it retrieving, is flnt402 indexed, is the table index-organized?
Also, why is this code being executed so many times? Is it a case of PL/SQL looking up values then joining to another data set through PL/SQL code instead of through SQL?
it is fetching 7262 rows and the column is indexed primary key
it is used as part of pl/sql
it's building a list to use as a lookup table inside PL/SQL?
we can not do anything regarding this query
How fragmented the table is? What does the explain plan show? What is the optimizer it was trying to make use of in the explain plan? Also is it a simple pk or composit pk?
Thanx
Sam
If you can make this an index-organized table on a composite pk of (flnt402,code12) then that would be beneficial.