Oracle's paging mechanism

xiaoxiao2021-03-06  42

Oracle's paging mechanism is mainly not more than two ways. Use ROWNUM sequences, the advantage of this method is that when you find a few pages, the speed is relatively fast, the data queried is not completely accurate, inquiry When the amount of data is large, especially the query last few pages are very slow. Slect Col1, Col2, .., Coln from (Select Rownum RN, Col1, Col2, ...., Coln from Table_Namewhere ... and rownum < = N) WHERE RN> = m; 2. Analyzing function that is supported using Oracle8i This method is quite high, the query efficiency is relatively stable. It is recommended to use this method .Select Col1, Col2, .., coln From (select row_number () over (Order By Colx Desc / ASC) RN, Col1, Col2, ...., Coln from Table_Namewhere ...) Where rn Between M and N;

转载请注明原文地址:https://www.9cbs.com/read-68021.html

New Post(0)