postgresql에서 index 관련하여 테스트 결과


postgresql에서 index 관련하여 테스트 결과

1. 단일 column이 index가 걸려 있을 경우 - index1 : customer_id (pk) - index2 : customer_name - index3 : customer_mail 1.2 검색조건이 기본키가 포함되어 있으면 무조건 기본키 index를 탄다. 1.3 index는 무조건 가장 마지막에 등록된 index 하나만 탄다. ex) select * from customer where customer_name = '가나' and customer_mail = '[email protected]' select * from customer where customer_mail = '[email protected]' and customer_name = '가나' 위 2개의 query문은 customer_name과 customer_mail 두개의 index를 모두 타는게 아니라 둘 중 나중에 등록된 customer_mail column에 대해 index를 탄다. 1.4 단순 join으로는 index를 타지 ...


#IT·컴퓨터

원문링크 : postgresql에서 index 관련하여 테스트 결과