Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6-2장] index_subquery로 접근하는 상황 #5

Open
lxxjn0 opened this issue Nov 23, 2020 · 1 comment
Open

[6-2장] index_subquery로 접근하는 상황 #5

lxxjn0 opened this issue Nov 23, 2020 · 1 comment
Labels
Stuck 해결하지 못한 이슈

Comments

@lxxjn0
Copy link
Member

lxxjn0 commented Nov 23, 2020

p.288
index_subquery
IN(subquery) 형태의 조건에서 subquery의 반환 값에 중복된 값이 있을 수 있지만 인덱스를 이용해 중복된 값을 제거할 수 있음

질문 : 여기서 인덱스를 이용해 중복된 값을 제거한다는 말의 의미를 잘 이해하지 못하겠어요!! 도와주세요~~~ @pci2676 @YebinK

@lxxjn0 lxxjn0 added this to the Real MySQL 6.1 - 6.2.4 milestone Nov 23, 2020
@pci2676 pci2676 added the Stuck 해결하지 못한 이슈 label Nov 23, 2020
@YebinK
Copy link
Member

YebinK commented Nov 23, 2020

SELECT * FROM employees WHERE emp_no IN (1, 2, 3);
SELECT * FROM employees WHERE emp_no IN (1, 1, 2, 2, 3, 3, 3); -> 이런 경우에 (1, 2, 3)으로 줄일 수 있다. -> 왜 인덱스로 처리하는지는 모르겠다.

인덱스 공부하고 돌아오기!

@lxxjn0 lxxjn0 removed this from the Real MySQL 6.1 - 6.2.4 milestone Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stuck 해결하지 못한 이슈
Projects
None yet
Development

No branches or pull requests

3 participants