사용자 도구

사이트 도구


database:mysql:index

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
마지막 판 양쪽 다음 판
database:mysql:index [2019/01/23 11:18]
kwon37xi
database:mysql:index [2020/11/24 18:53]
kwon37xi
줄 6: 줄 6:
   * [[https://stackoverflow.com/questions/14230892/difference-between-using-references-with-and-without-foreign-key|mysql - Difference between using REFERENCES with and without FOREIGN KEY? - Stack Overflow]]   * [[https://stackoverflow.com/questions/14230892/difference-between-using-references-with-and-without-foreign-key|mysql - Difference between using REFERENCES with and without FOREIGN KEY? - Stack Overflow]]
   * https://dev.mysql.com/doc/refman/5.7/en/create-table.html   * https://dev.mysql.com/doc/refman/5.7/en/create-table.html
-> MySQL parses but **ignores “inline REFERENCES specifications”** (as defined in the SQL standard) where the references are defined as part of the column specification. MySQL accepts REFERENCES clauses only when specified as part of a separate FOREIGN KEY specification. + > MySQL parses but **ignores “inline REFERENCES specifications”** (as defined in the SQL standard) where the references are defined as part of the column specification. MySQL accepts REFERENCES clauses only when specified as part of a separate FOREIGN KEY specification.
- +
- +
- +
  
 ===== Index 생성 ===== ===== Index 생성 =====
줄 73: 줄 69:
 ORDER BY id ORDER BY id
 </code> </code>
 +
 +
 +===== Covering Index =====
 +  * [[https://gywn.net/2012/04/mysql-covering-index/|MySQL에서 커버링 인덱스로 쿼리 성능을 높여보자!! | gywndi's database]]
 +  * Index 에 있는 값만으로 ''where'', ''order by'', ''select 각 필드''를 처리할 수 있는 상황.
 +  * 실제 데이터를 찾아 읽는 것보다 훨씬 빠르다.
 +  * 또한, 테이블 전체 컬럼이 select 대상이더라도 먼저 커버링 인덱스로 PK값만가져오고, 그 결과로 나머지 컬럼을 가져오는게 훨씬 빠른 경우도 많다.
 +
 +
  
  
database/mysql/index.txt · 마지막으로 수정됨: 2020/11/24 18:55 저자 kwon37xi