보관함

Database Index 타지 않는 경우

  • Index를 사용한 필드의 조건 검색이 not, <, > 일 경우 Index를 사용하지 않습니다. ( => , <= , =, Between 은 사용이 가능합니다.)
  • Index를 사용한 필드의 조건 검색이 like ‘%값’ 혹은 ‘%값%’인 경우 Index를 사용하지 않습니다. (like ‘값%’은 사용 가능 합니다.)
  • Index를 사용한 필드의 조건 검색이 다른 필드와 비교일 경우 Index를 사용하지 않습니다. (where 컬럼1=컬럼2)
  • order by 인덱스 컬럼1,컬럼2  : 복수의 키에 대해서 order by를 사용한 경우
  • where 컬럼1=’값’ order by 인덱스 컬럼  : 연속하지 않은 컬럼에 대해 order by를 실행한 경우
  • order by 인덱스컬럼1 desc, 인덱스컬럼2 asc  : desc와 asc를 혼합하여 사용한 경우
  • group by 컬럼1 order by 컬럼2  : group by와 order by의 컬럼이 다른 경우
  • order by abs(컬럼)  : order by절에 다른 표현을 사용할 경우

참조 : https://code-factory.tistory.com/24

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

  

  

  

이 사이트는 스팸을 줄이는 아키스밋을 사용합니다. 댓글이 어떻게 처리되는지 알아보십시오.