MySQL – Multi Range Read (MRR)와 관련된 매뉴얼 Bug 및 소스 디버깅을 통한 검증

MySQL의 Multi Range Read (MRR)를 연구하던 중에 이해할 수 없는 내용을 매뉴얼에서 접했습니다. 몇 가지 Test와 Source Debugging을 통해, 아래 내용은 Manual Bug로 자체 판단했습니다. 자세한 내용은 여기를 참고해 주세요.

Without MRR, an index scan covers all index tuples for the key_part1 range from 1000 up to 2000, regardless of the key_part2 value in these tuples. The scan does extra work to the extent that tuples in the range contain key_part2 values other than 10000.

With MRR, the scan is broken up into multiple ranges, each for a single value of key_part1 (1000, 1001, … , 1999). Each of these scans need look only for tuples with key_part2 = 10000. If the index contains many tuples for which key_part2 is not 10000, MRR results in many fewer index tuples being read.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s