| |
작성자 : 좋은진호(truefeel, http://coffeenix.net/ )
작성일 : 2000.2(?)
mysql_fetch_array 함수와 mysql_result 함수를 써서 data를 가져올 때
처리 속도 테스트 결과 (최소 3회 이상 테스트)
Table 명 : JIGA
등록된 건수 : 286,445건
코드 :
| |
-----------------------------------------------------------
mysql_fetch_array(), 2000개만 가져온 예.
$query = "
SELECT ID
FROM JIGA
LIMIT 0,2000";
$result = mysql_query($query);
$menu_cnt = mysql_num_rows($result);
for ( $i=0; $i < $menu_cnt; $i++ ) {
$result_row = mysql_fetch_array($result);
$ID = $result_row["ID"];
if ( ($i+1) % 100 == 0) {
echo "$ID";
echo " ";
}
}
-----------------------------------------------------------
| |
자료를 2000개 이하로 가져올 때는 거의 동일
| |
---------- ------------------ -----------------
건수 mysql_fetch_array mysql_result
---------- ------------------ -----------------
3000건 0초 1초
5000건 0초 2초
6000건 0~1초 3초
8000건 0초 6초
10000건 0~1초 8~10초
15000건 0~1초 19~20초
20000건 1~2초 34,35,35,38초
28만건이상 15초 측정불가(10분 이상)
---------- ------------------ -----------------
| |
|