일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- 스테이크
- Sekai Entertainment
- 여름
- 원탭바이
- 신쥬쿠
- 명령어
- 자동차
- 동경 모터쇼
- 일본
- paypay
- fish
- 돈까스
- 라면
- 전철
- しまじろう
- Shimajirou
- 시스템관리
- 사이타마
- 리눅스
- one tab buy
- TOY
- 영단어
- 시마지로
- 코라쿠엔
- 米沢、팽이
- youtuber
- 토익
- 돼지갈비
- 칸칸
- 점심
- Today
- Total
IT Japan
[mySQL5.5] 17장. Views 본문
n
View
Algorithm
① UNDEFINED : default algorithm
MySQL chooses which algorithm to use. It prefers MERGE over TEMPTABLE if possible, because MERGE is usually more efficient and
because a view cannot be updatable if a temporary table is used.
② MERGE :
handled by
merging corresponding parts of a view definition into the statement that refers
to the view
If the MERGE algorithm
cannot be used, a temporary table must be used instead
MERGE 안되는 경우:
ü Aggregate functions (SUM(), MIN(), MAX(), COUNT(), and so forth)
ü DISTINCT
ü GROUP BY
ü HAVING
ü LIMIT
ü Subquery in the select list
ü Refers only to literal values (in this case, there is no underlying table)
③ TEMPTABLE :
the results from the view are retrieved into a temporary table, which then is
used to execute the statement.
locks can be released on underlying tables after the temporary table has been
created and before it is used to finish processing the statement. This might
result in quicker lock release than the MERGE algorithm so that other clients
that use the view are not blocked as long.
'MySQL' 카테고리의 다른 글
[mySQL5.5] 19장. Replication (0) | 2016.03.23 |
---|---|
[mySQL5.5] 18장. Backup & Recvoery (0) | 2016.03.23 |
[mySQL5.5] 14장. 자동 통계 수집 (0) | 2016.03.23 |
[mySQL5.5] 14장. Table Maintenance (0) | 2016.03.23 |
[mySQL5.5] 13장. MySQL 을SSL connection가능하게 설정 (0) | 2016.03.23 |