본문 바로가기

Oracle

[Oracle] COPY_T 테이블 필요한가? ▶ 더미 테이블을 사용해서 장애를 만나는 경우 ▶ 더미 테이블을 사용하는 이유 ▶ 더미 테이블을 사용하지 않는 방법 포장마차에서 지인에게 재미있는 이야기를 들었다. 물론 공장 이야기 이다. 나는 이야기를 재미있게 들었지만, 지인의 입장에서는 머리가 쭈뼛쭈뼛 서는 심각한 일이었다. 사건은 2011년 겨울에 시작된다. 2011년 1월 1일 이른 아침, 갑자기 잘 돌아가던 시스템에 몇몇 프로그램들이 작동하지 않는 장애를 만났다. Y2K 버그도 아니고 2011년 1월 1일에 장애라니? 서버와 네트워크 그리고 Database는 정상이므로 관심의 화살은 개발팀으로 집중되었다. 개발팀에서 장애 프로그램을 조사해보니 지난 한 달간 프로그램 수정이 없다고 하였다. 결국 모든 것이 정상인데 프로그램만 돌아가지 않는 상황이.. 더보기
[Oracle] 11g R2 : NTH_VALUE Function NTH_VALUE Function The NTH_VALUE function enables you to find column values from an arbitrary row in the window. This could be used when, for example, you want to retrieve the 5th highest closing price for a company's shares during a year. The LAG and LEAD functions can be thought of as being related to, and a simplification of, the NTH_VALUE function. With LAG and LEAD, you can only retrieve va.. 더보기
[Oracle] 11g R2 : IGNORE_ROW_ON_DUPKEY_INDEX Hint IGNORE_ROW_ON_DUPKEY_INDEX Hint When a statement of the form INSERT INTO target subquery runs, a unique key for some rows to be inserted might collide with existing rows. Suppose that your application must ignore such collisions and insert the rows that do not collide with existing rows. Before Oracle Database 11g Release 2, you had to write a PL/SQL program which, in a block with a NULL handler.. 더보기
[Oracle] 11g R2 : LISTAGG Function Advanced Aggregates for Analysis This section illustrates the following advanced analytic aggregate functions: LISTAGG Function The LISTAGG function orders data within each group based on the ORDER BY clause and then concatenates the values of the measure column. Its syntax is as follows:LISTAGG ( [, ) WITHIN GROUP (ORDER BY ) expr can be a column, constant, bind variable, or an expression invol.. 더보기
[Oracle] explain plan을 활용한 인덱스 생성 예상시간 explain plan for create index orders_ix01 on orders (customer_id, order_mode) ; select * from table(dbms_xplan.display) ; Plan hash value: 4214405511 ------------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | ------------------------------------------------------------------------------- | 0 | CREAT.. 더보기