문제

Is there a way to force index into cache for InnoDB tables?

The problem is I don't have enough memory to load all indexes into memory, so I want to cache particular ones.

도움이 되었습니까?

해결책

Loading the primary key (clustered) index:

SELECT COUNT(*) FROM tbl_name

Loading secondary index:

SELECT COUNT(*) FROM tbl_name FORCE INDEX(key_name)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top