힌트 (SQL)
데이터베이스 쿼리에서 다양한 SQL 구현체들은 데이터베이스 엔진에 쿼리 실행 방법을 지시하는 SQL 표준의 추가분으로서 힌트(hint)를 사용한다. 이를테면 힌트는 엔진에게 가능한 메모리를 덜 쓰도록 지시할 수도 있고(쿼리가 느리게 동작하더라도), 색인의 사용 여부를 알릴 수도 있다(쿼리 최적화에 관계 없이).
구현체
여러 데이터베이스 엔진들은 힌트 구현 시 각기 다른 접근 방식을 사용한다.
- MySQL은 SQL 표준의 자체 확장을 사용하는데, 테이블 이름 뒤에 USE INDEX, FORCE INDEX , IGNORE INDEX 키워드가 올 수 있다.[1]
- 오라클은 특별히 제작된 코멘트(comment)를 + 기호로 시작하는 쿼리 안에 사용함으로써 SQL 호환성에 영향을 미치지 않음과 동시에 힌트를 구현한다.[2]
- Postgres Plus® Advanced Server(엔터프라이즈DB에서 출시된 PostgreSQL의 사유 버전)는 오라클과 동일하게 호환되는 힌트들을 제공한다.[3][4]
같이 보기
참조
- ↑ MySQL 5.5 Reference Manual: 12.2.9.3 Index Hint Syntax
- ↑ Mike Ault: Oracle SQL Hints Tuning 보관됨 2014-04-19 - 웨이백 머신
- ↑ “Postgres Plus Advanced Server Performance and Scalability Guide: Query Optimization Hints”. 2014년 4월 19일에 원본 문서에서 보존된 문서. 2014년 4월 18일에 확인함.
- ↑ “Postgres Plus Advanced Server Oracle Compatibility Developer's Guide: Optimizer Hints”. 2014년 4월 19일에 원본 문서에서 보존된 문서. 2014년 4월 18일에 확인함.
| 이 글은 소프트웨어에 관한 토막글입니다. 여러분의 지식으로 알차게 문서를 완성해 갑시다. |
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.