Changeset 2606

Show
Ignore:
Timestamp:
11/28/06 02:06:22 (2 years ago)
Author:
inureyes
Message:
  • 최근 태그 쿼리시 join 명령 실행때 참조하는 테이블 중 Entries 테이블의 id가

TagRelations와 연결되는데, 다른 검색 부분에 다 인덱스가 걸려있음에도 Entries의
id에 인덱스가 걸려있지 않아서 태그 보여줄 때 마다 Entries 테이블을 몽땅 쿼리하는
문제점 해결.

  • ab 테스트결과 태그 출력이 있는 경우 약 350%~400% 정도 빨라졌음.
Location:
branches/1.1-beta
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/1.1-beta/blog/checkup/index.php

    r2504 r2606  
    383383} 
    384384 
     385if (DBQuery::queryCell("DESC {$database['prefix']}Entries id", 'Key') != 'MUL') { // Since 1.0.3 
     386    $changed = true; 
     387    echo '<li>', _text('본문 테이블에 태그 검색 향상을 위한 인덱스를 추가합니다.'), ': '; 
     388    if (DBQuery::execute("ALTER TABLE {$database['prefix']}Entries ADD INDEX id (id)")) 
     389        echo '<span style="color:#33CC33;">', _text('성공'), '</span></li>'; 
     390    else 
     391        echo '<span style="color:#FF0066;">', _text('실패'), '</span></li>'; 
     392} 
     393 
    385394$filename = ROOT . '/.htaccess'; 
    386395$fp = fopen($filename, "r"); 
  • branches/1.1-beta/lib/config.php

    r2586 r2606  
    44/// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 
    55define('TATTERTOOLS_NAME', 'Tattertools'); 
    6 define('TATTERTOOLS_VERSION', '1.1.0.2 : Friends'); 
     6define('TATTERTOOLS_VERSION', '1.1.0.3a1 : Friends'); 
    77define('TATTERTOOLS_COPYRIGHT', 'Copyright &copy; 2004-2006. Tatter &amp; Company / Tatter &amp; Friends. All rights reserved. Licensed under the GPL.'); 
    88define('TATTERTOOLS_HOMEPAGE', 'http://www.tattertools.com/'); 
  • branches/1.1-beta/setup.php

    r2566 r2606  
    11261126  PRIMARY KEY (owner, id, draft), 
    11271127  KEY owner (owner), 
    1128   KEY category (category) 
     1128  KEY category (category), 
     1129  KEY id (id) 
    11291130) $charset; 
    11301131CREATE TABLE {$_POST['dbPrefix']}FeedGroupRelations (