Home » RDBMS Server » Performance Tuning » what is "count stopkey"? (oracle 10g)
what is "count stopkey"? [message #382545] Thu, 22 January 2009 21:11 Go to next message
lzfhope
Messages: 69
Registered: July 2006
Member
hi,
i have three questions abount this.
1) what is "count stopkey"
2) How oracle implement it ?
3) where can find the relative object about this?
ANY WORD FROM YOU IS WELCOME!
Re: what is "count stopkey"? [message #382549 is a reply to message #382545] Thu, 22 January 2009 22:03 Go to previous messageGo to next message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
What's your Google's result?
What's your Oracle document worldwide result?
What's your OraFaq's result?
Have you tried to test?
Re: what is "count stopkey"? [message #382552 is a reply to message #382549] Thu, 22 January 2009 22:40 Go to previous messageGo to next message
lzfhope
Messages: 69
Registered: July 2006
Member
hi,
In fact,i just know a little about this subject.
for example,the sql below will use stopkey:
"select * from (select rownum r,a.* from tab a where rownum<100) where r>=10"
BUT,What i want to know is "how oracle implement this ",not "which sql will use stopkey" .as all know, oracle there are huge documents ,so is not easy to find a given subject.
AS for other situations,They are similar to what described above.
Re: what is "count stopkey"? [message #382848 is a reply to message #382552] Sun, 25 January 2009 19:35 Go to previous messageGo to next message
rleishman
Messages: 3728
Registered: October 2005
Location: Melbourne, Australia
Senior Member
STOPKEY occurs when you have a ROWNUM < n clause in your SQL. Look at the steps of the Explain Plan INSIDE the STOPKEY step; when these steps have retrieved enough rows to satisfy the ROWNUM clause, it will not get any more. By adding such a clause to a SQL that fetches millions of rows, you can get it to return a small number of matching rows faster.

Ross Leishman
Re: what is "count stopkey"? [message #383944 is a reply to message #382848] Sat, 31 January 2009 19:28 Go to previous message
lzfhope
Messages: 69
Registered: July 2006
Member
thank!
so ,i can conclude that oracle have the mechanism to realize the stopkey .
Smile
Previous Topic: query tuning
Next Topic: best performance quries
Goto Forum:
  


Current Time: Fri Nov 22 18:23:00 CST 2024