안랩 ASEC팀에서 작성한 글 입니다.
패킷 뜯어 보기! - WireShark 편
와이어샤크를 통한 패킷 덤프(Packet Dump)
네트워크 상태 보기! - TCP View 편 (1)
악성코드 대응! - TCP View 편 (2)
Java HotSpot Garbage Collection
http://www.oracle.com/technetwork/java/javase/tech/index-jsp-140228.html
Diagnosing a Garbage Collection problem
http://www.oracle.com/technetwork/java/example-141412.html
Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine
http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html
Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning
http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html
A flaw in the implementation of a card-marking performance optimization in the JVM can cause heap corruption under some circumstances. This issue affects the CMS garbage collector prior to 6u18, and the CMS, G1 and Parallel Garbage Collectors in 6u18. The serial garbage collector is not affected. Applications most likely to be affected by this issue are those that allocate very large objects which would not normally fit in Eden, or those that make extensive use of JNI Critical Sections (JNI Get/Release*Critical).
This issue will be fixed in the next Java SE 6 update.
Meanwhile, as a workaround to the issue, users should disable this performance optimization by -XX:-ReduceInitialCardMarks.
-- my_proc 프로시져 생성 CREATE OR REPLACE PROCEDURE my_proc (p_id IN NUMBER, p_name OUT VARCHAR2) IS v_last_name employees.last_name%TYPE; BEGIN SELECT last_name INTO v_last_name FROM employees WHERE employee_id = p_id; p_name := v_last_name; END; /
-- my_proc 프로시저의 OUT리턴값을 확인하기 위해서 다음을 실행 DECLARE v_name VARCHAR2(30) := 'HELLO'; BEGIN DBMS_OUTPUT.PUT_LINE(v_name); my_proc(102, v_name); DBMS_OUTPUT.PUT_LINE(v_name); END; /
-- IN OUT 변수를 하나의 파라미터로 사용하기 -- JOBS 테이블에서 job_id로 조회하고, job_title를 리턴받는다. CREATE OR REPLACE PROCEDURE pr_get_job (p_job IN OUT VARCHAR2) IS BEGIN SELECT job_title INTO p_job FROM jobs WHERE job_id = p_job; END; /
-- pr_get_job 프로시저의 OUT리턴값을 확인하기 위해서 다음을 실행 DECLARE v_job VARCHAR2(30) := 'SA_MAN'; BEGIN DBMS_OUTPUT.PUT_LINE(v_job); my_proc(v_job); DBMS_OUTPUT.PUT_LINE(v_job); END; /
-- FUNCTION 사용하기 -- join 으로 할 거 테스트하기 (이렇게 사용하지 말자) : 실제 Nested Loop Join을 발생시킨다.. CREATE OR REPLACE FUNCTION fn_get_dept(p_dept IN NUMBER) RETURN VARCHAR2 IS v_name VARCHAR2(50);> BEGIN SELECT department_name INTO v_name FROM departments WHERE department_id = p_dept; RETURN(v_name); END; /
-- fn_get_dept FUNCTION 사용하기 --column last_name format A20 --column dname format A25 SELECT employee_id, last_name, department_id, fn_get_dept(department_id) dname FROM employees; TIP) 위 처럼 하면, 모든 쿼리가 2번씩 실행되어, 성능에 지대한 영향을 끼친다. 차라리 Sub Query 를 사용하자! (sub query는 같은 department_id 에 대해서는 쿼리가 한번만 실행된다!!) SELECT employee_id, last_name, department_id, ( SELECT department_name INTO v_name FROM departments WHERE department_id = A.department_id ) dname FROM employees A;* 삭제시에는