Home > database >  Query the currently executing SQL good slow ah, how to get faster?
Query the currently executing SQL good slow ah, how to get faster?

Time:09-28

this paragraph need 1 minute to execute SQL completed
 
The SELECT a.u sername, a.s id, b.s ql_text
The FROM v $session a, v $sqlarea b
WHERE a.u sername IS NOT NULL AND a.s ql_address=b.a ddress



 select count (*) from v $session; 
return 166

 select count (*) from v $sqlarea; 
return 386323


Are v $sqlarea records too much lead to query is slow? How to clean up the record in the v $sqlarea?

CodePudding user response:

Sql_address indexing, give it a try,

CodePudding user response:

Use SQL execution plan a look

CodePudding user response:

You can try to use natural connection to remove some duplicate data, don't know can shorten the query time, index can shorten the query time
  • Related