优秀是一种习惯 , 生活是一种过程 , 放弃是一种智慧 , 缺点是一种恩惠。 我的MSN: qiwang1979@hotmail.com , 希望结交更多喜欢Oracle, Linux,热爱生活的朋友。 欢迎加入Oracle数据库讨论QQ群组 (号码:42235266),希望大家在这里共同进步 !

soft parse(软解析),hard parse(硬解析)

上一篇 / 下一篇  2007-02-02 00:00:00 / 个人分类:Oracle数据库管理

link:
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:801662252143

hard parse:在share pool中没找到该SQL,则进行一次hard parse。
soft parse: 在share pool中可以找到该SQL,则进行一次soft parse。
还有一种softer soft parse....


There are two types of parses (well, actually "three" these days).

They are

o HARD parse -- the query has never been seen before, isn't in the shared pool.
We must parse it, hash it, look in the shared pool for it, don't find it,
security check it, optimize it, etc (lots of work).

o SOFT parse -- the query has been seen before, is in the shared poo. We have
to parse it, hash it, look in the shared pool for it and find it (less work then
a hard parse but work none the less)

o a kinder, softer SOFT parse -- you are using session_cached_cursors (search
this site for that word for info). We take your query, look in the sessions
cursor cache -- find the cursor and reuse it. Very very little work.

So, after "startup", you go into sqlplus and do this:

SQL> alter session set session_cached_cursors=0; -- just making sure this is off
SQL> select * from emp; -- hard parse
SQL> select * from emp; -- soft parse
SQL> select * from emp; -- soft parse
SQL> alter session set session_cached_cursors=100; -- enable this feature
SQL> select * from emp; -- soft parse
SQL> select * from emp; -- kinder, gentler, soft parse


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-01-27  
  12345
6789101112
13141516171819
20212223242526
2728293031  

我的存档

数据统计

  • 访问量: 277
  • 日志数: 1311
  • 建立时间: 2007-12-10
  • 更新时间: 2007-12-10

RSS订阅

Open Toolbar