$cfg->postnum=10;
$page = 1;
SELECT
cn_num, cn_kind, cn_title,cn_contents,
cn_cnt,to_char(cn_inputdate,'yyyy/mm/dd'),
cn_use
FROM
(SELECT
/*+index_desc(cn_announce_cn_num_pk)*/
rownum
as rnum, cn_num, cn_kind, cn_title,cn_contents,
cn_cnt,cn_inputdate, cn_use
FROM
(SELECT cn_num, cn_kind,
cn_title,cn_contents, cn_cnt,cn_inputdate, cn_use
FROM
cs_announce
ORDER BY cn_num desc
)
WHERE
cn_use='Y'";
)
WHERE rnum >=
(($page-1)*$cfg->postnum+1) AND (rownum <=
$cfg->postnum)
참고해볼 심화학습들....
http://cafe.naver.com/crystal510.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=16586
http://blog.naver.com/hjc426?Redirect=Log&logNo=130021050759
=================================================
알고리즘
======================================================
쿼리속도향상 인덱스 최적화
http://www.javaservice.net/%7Ejava/bbs/read.cgi?b=jdbc&c=r_p&m=etc&n=989891542&s=t
'프로그램.코딩' 카테고리의 다른 글
JW FLV player (0) | 2007.12.03 |
---|---|
INSERT ... SELECT Syntax (0) | 2007.11.05 |
Snoopy 소켓 클래스 라이브러리 (0) | 2007.09.20 |
플래시8을 이용한 업로더.. (0) | 2007.09.03 |
단순쿼리브라우져.. (0) | 2007.08.30 |
댓글