일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 리눅스
- 명령어
- youtuber
- 여름
- 라면
- 米沢、팽이
- 시마지로
- 토익
- 일본
- Sekai Entertainment
- 원탭바이
- 스테이크
- 자동차
- 영단어
- 점심
- 신쥬쿠
- 동경 모터쇼
- しまじろう
- 전철
- 코라쿠엔
- fish
- paypay
- 돼지갈비
- Shimajirou
- 돈까스
- 시스템관리
- 칸칸
- one tab buy
- TOY
- 사이타마
- 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 |