what is "count stopkey"? [message #382545] |
Thu, 22 January 2009 21:11 |
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 #382552 is a reply to message #382549] |
Thu, 22 January 2009 22:40 |
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 |
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
|
|
|
|