DB2 for LUW?? ????? ?? Snapshot ????
?????. DB2 ? XpertMon ??? ???! ? ????????? DB??????.
?? ?? XpertMon ????? ?? ??? ???? ???? ? ? ???? ????? ?? ?? ??? ?? ???, XpertMon? ??? ????? ?? ???? History? ????(DPF, OLTP, Batch …) ? ?? ??? KPI? ???? ?? ?? ???? ? ??? ??? ????. ?? ???? ???? ???? ????? ??? ???? ?? ???? ?????.
?? ?? “DB2 for LUW?? ????? ?? ?? ?? ??? Snapshot ????” ? ?? ????? ?????.
???? ?? ????? ???, ?? ?????? ?? ???? ( www.iteg.co.kr) ???? ????? ?? ? ????. ???? ?? ?? ???? ??? ??? ??? ??????. ???? ????? ?????.
AGENDA
1. ???? Tuning ?? Focus
2. Snapshot Monitor SQL Table Function
A. Snapshot Monitor SQL Table Function ??
B. Snapshot Monitor SQL Table Function? ??? ?? ??? ??
3. Snapshot? ??? ????
4. V9?? ?? ?? SQL administrative view
Point, Click and Run: Using snapshots to Improve Performance in DB2 for LUW
1. ???? Tuning
Tuning in a vacuum
Ø ??? Database ????? OLTP?? Batch Job? ?? ???? ??? ????. OLTP? ??? ?? ?? Batch Process? ?????, ? ??? Batch process? ?? ?? OLTP? ???? ??? ?? ????. ??? Process ?? SQL ??? ?? ?? ?? ???? ??????? ?? ?? ??? ??? ? ?? ?????.
??? localized tuning? ?? ??? ??? ?? ?? ???? ??? ? ? ????. (ex ?? Application? ?? select ??? ???? ???? ?? ?? ?? ??? ?? ???, ?? Application ? Insert, update ??? ?? ?? Application? ? ?? ?? ?? ??? ??? ?? ????.)
????, ???? Tuning?? ???? ????? ???? Application????? ?? ???? ??? ?? ? ????.
Ø ?? ? ????, Hardware, OS, CPU, I/O bound, Application (??? SQL) ? Network ??? ????? ???? ???? Tuning ? ?? ???..
u ?? ??? ???? ???? ??? ???? ?????.
2. Snapshot Monitor SQL Table Function
A. Snapshot Monitor SQL Table Function ??
Ø Get Snapshot???? ?? ??? ??? Snapshot ??? ???? ??? ???? ??? ??? ??? ?? ??? ?? ? monitor switch ? on ???? ?? ??? ?????.
Ø ??? ??? ???? From ???? ?? ?????, DB?? ?? ?? ???? ‘’ ?? cast (null as char) ?? ???? ??, ???? ??? ??? ?? ???? DB? ??? ?? ???.
Ø ?? Partition No. ?? ???? ?? ?? -1 ?? null? ????, ?? Partition ? ?? ???? ?? ?? -2? partitionnum ??? ?????.
Ø DB2 LUW 8.2??? 21?? ??? ??? ?????
u ???
u ?? ??
u ?? (Xpertmon? ???? ?? ?? ?? ?? ?? ? ? ????.)
B. Snapshot Monitor SQL Table Function? ?? ? ?? ??? ??
Ø ??? ??? ???? ???? table? ??????, ?? ?? ???? ?? ?? ???. ??? ??? ??? ????, ?? ???? ???? ?? ? ???? ?? Plan? ??? ?, insert into ~~ (select ~) ??? ?? ?? ?? ???? ???? ???? ???? ???. ??, AT ??? ?? crontab???? ???? ???? ???? ?? ?? ?? ?? ?? ?? ?? ??? ???? ? ?? ????.
u ?? ??
3. Snapshot? ?? ? ????
A. ???? ??? unused ????? ?? 1
Ø ??? ???? ???? ??? Tuning ??? ????, ?? ?? ?? ? ? ??? ?? ?? ?????.
Ø ?? ?? ?? indexes? ??? ??? ?? ? ????, ???? ?? ???? ?? ?? ??? ?? ? ????.
Ø ??? ?? ??? ?? ? ? ??? ????, ??? ???? ?? Snapshot? ???? ??, ??? ???? ??? ???? ??? ???? ?? ????? ??? ???.
i. ?? Snapshot Table? ?????. (Create TBLSNP table)
ii. ???? ?? ???? ?? ROWS_WRITTEN??? ?? Top 10? Table? ????.
(ROWS_WRITTEN? ???? ?? ???? ?????.
iii. Top 10? ???? ?? Snapshot? ???? dynamic SQL ??? ????, ??? ??? ??? ????? ?????.
iv. SQL??? ??? ???? ?? ? Top 10 ? SQL ??? ?????.
Ø ?????? ??? ?? ? ??? ???? ?? ???? ??? ?????.
u Cron job, AT process? ??
u ??? ??? ? ?? ??? ?? ???? ??? ?? ??
u db2explain ? ??? Excel? ??? ?? ? ???? ???? ??? ?.
ü ?? explain? ?? ?? ? ?? explain ???? ?? ??. (explain ???? ?? ?? ???. ??? Explain???? ?? ??? ???? ??? ??. ??? ID? ??? ??? ?? explain ??? ? ??? ???. )
ü db2explain??? ?? ??? ???? Explain table? ?????.
ü ?? ???? ?? ??? ?? ???? ?? ???? ???.
ü access plan? ?? ???? ?? ???? ?????.
ü Explain ???? ?? ?? ???? ?? ?? ?? ? ?? ?? ?? ????? ???. Excel? ODBC? ???? Database?? ???? ??? ? ????.
è ODBC ??: ??? –????-??? ??(ODBC) - ??? DSN ??-?? (D)
è Excel ?? ??: MS Excel ?? – ??? – ???? – Microsoft Query – ????? ??
è ???? ??? ?? ?? DB Object? ?? ??? ?? ?? ??? ?????.
ü Object ?? ??? ?? ? ?? ???? DDL? ?? ? ???? ?? ??? ???.
B. ???? ??? ?? 2
Ø Table ??? ???? ?? ??? ? ? ????.
snapshot_table? ?? Rows_read, Rows_Written ? ??? ?? ?????..
read ??? ?? ???? write ??? ?? ??? ?? ???? Replicated Table ??? ???? ??? ??? ? ?? ????? ?? ??? ???.
Ø Explain ???? ?? ?? ???? ?? ?? ? ?? Delta ?? ????? ???. Excel? ODBC? ???? Database?? ???? ??? ? ????.
C. ? ??? ?? ??
Ø 1?? ??? ?? ?? ? Snapshot? ?? ??? ???? ??? ?? ? ???? ad-hoc ?? ?? ??? ????? ?? ?? ????? ??? ?? ???? ?? ?? ????.
????, ??? ???? ??? Batch ?? USER ?????? ??? ?? ????. ???? ?????? ???? ???? ?? ????, ???? ??? ?? ?? ??, Runstats ? Backup ????? ?????.
Ø ??? ?? ??? UNIQUE INDEX? ?? ?????. UNIQUE INDEX? ??? ??? ??? ???? ?? ??? ???? ??? ??? ?? ??? ? ??? ????, access plan? ???? ??? ??? ???. ???? ?? ???? ?? ?? ?? resource? ????? Insert/update?? ???? ????? ???? ??? ??? ????.
Ø ?? ??? read ??? ?? ???? write ??? ?? ??? ?? ?, ? High read /row write ? ???? Table Cron? ??? ?? ? ?? ????. ?? Table??? ??? Job? ?? ??? ?? refresh? ??? ??? ?? ???. Cron? ???? Cron Table?? Job? ?? ??? ??? ????? ? ? ????.
Ø Snapshot ????? ?? Object? ??? Application? ?? ? ? ???, DB??? ?? Application ????? ?? ? ? ??, ??? ???? ??? ???? ??? ??? ?? ???? ??? ? ? ????.
4. V9?? ?? ?? SQL administrative view
Ø DB2 V9 for LUW????? administrative view? ????, ??? ???? ? ?? ??? ?????. ? View?? SYSIBMADM ???? ???? ????..
Ø ????? ?? Administrative View
Ø ?????
http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.doc/d
oc/r0006117.htm?resultof=%22%53%4e%41%50%42%50%5f%50%41%52%54%22%20
|