이경환님께서 이런 방법을 알려주셨는데.. 어떻게 써야할지
모르겠습니다.
메뉴얼에 다 나와있다고 하지만 이해가 안가네요.. expr1,2에는
뭐를 써야 할지..
귀찮으시겠지만 응용해주시면 감사하겠습니다.. ^^
=================================================================================
Use ALTER TABLE ... ORDER BY expr1 , expr2 , ... if you mostly
retrieve rows in expr1 , expr2 , ... order. By using
this option after extensive changes to the table, you may be able
to get higher performance.
------------------------------------------------------------
alter table 문에도 튜닝할 꺼리가 있다는걸 처음 알았네요...
^^
------------------------------------------------------------
ALTER TABLE works by making a
temporary copy of the original table. The alteration is performed
on the copy, then the original table is deleted and the new one
is renamed. While ALTER TABLE is
executing, the original table is readable by other clients.
Updates and writes to the table are stalled until the new table
is ready, then are automatically redirected to the new table
without any failed updates.
=================================================================================
제가 겪고있는 문제점은 바로 이건데요..
한칸 추가하는 쿼리입니다. 그런데 이 쿼리 하나가 60초~80초
걸립니다.
ALTER 가 좀 부하가 많다고는 하는데.. 그리고 저 위에 설명된거
보면 새로 복사해서 거기에 하나 추가하고 이름을 변경해서 복사한걸
쓴다고 하는거 같다라구요..
# Time: 050522 18:41:34
# User@Host:
fishlover[fishlover] @ localhost.nameip.net [127.0.0.1]
# Query_time: 63 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
ALTER TABLE BNET ADD COLUMN auth_admin_ch_gaon VARCHAR(128);
한 4만개정도의 줄(가로)이 있구요
현재 칸(세로)도 좀 많습니다. (줄, 칸의 정확한 명칭을 잘
몰라서..)
한칸 늘리는 쿼리가 이렇게 많이 걸려서.. 쿼리 튜닝을 해보라고
하더라구요..
서버 사양은
셀 600, 램 256 , FreeBSD, MySql 4.0.19 입니다.
부탁드리겠습니다!
|