어라? 원하시는 답이 그게 아니었나...? (민망...-_-;)
order by를 쓰지않고서 역순검색이라... 저도 알고 싶은걸요?
이것은 www.informixkorea.com 에 가셔서 Q&A로 물어봅시다!
가장 정확한 답변이 금방 나오거든요...^^; (거의 하루 이내에)
hint 에 관한 것은 글쎄요... 앞서 나왔지만 '삼각형'에서 나온
'인포믹스 7.3 21일 완성' 에 나와있는 것을 본 적이 있는데요...
참고로 제가 보고있는 책은 인포믹스 교육센터 교재 중
'M & O'라 불리는 'Managing and Optimizing Informix Dynamix Server. 2000 Databases' 라는 책이구요...
에라 모르겠다! 답변도 제대로 못했는데 이왕 이렇게 된거 그 부분에 대해 나온 것만이라도 책에 나와있는대로 똑같이 적어드릴께요...
* Access Method directives *
The four access method directive provided by IDS include:
- INDEX
: INDEX supports zero or more indexes to be specified. If one index is specified, that index will be used. If more than one index is specified, the index used will be chosen from that list, based on the cost. If no specific indexes are named, then all indexes will be considered. A sequential table scan is never considered unless the table has no indexes.
ex) SELECT --+ INDEX (e salary_indx)
name, salary
FROM emp e
WHERE e.dno = 1
AND e.salary > 50000;
- AVOID_INDEX
: AVOID_INDEX accepts zero or more indexes which will NOT to be to access the table. This method allows the optimizer to consider indexes that are added after the query is written while avoiding known indexes that will slow down the query.
- FULL (tablename)
: FULL forces the optimizer to perform a sequential scan on the table specified, even if an index exists on a column.
ex) SELECT --+FULL(e)
name, salary
FROM emp e;
- AVOID_FULL (tablename)
: AVOID_FULL sill force the optimizer to avoid a full-table scan of the specified table if indexes exist. If no index exists, the optimizer performs a full-table scan. This directive might be used with REPEATABLE READ isolation level, for example, to avoid the full table scan and subsequent locking.
Multiple directives can be used as long as they are in the sam comment block.
ex) SELECT --+AVOID_FULL(e), INDEX (e salary_indx)
name, salary
FROM emp e
WHERE e.dno = 1
AND e.salary > 5000;
이상입니다. (똑같이 적었습니다...^^;)
질문을 정리하여 위 사이트에 가셔서 꼭 물어보세요. 저도 가서 답을 꼭 봐야 겠네여...
|