database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
ㆍInformix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
Informix Q&A 1035 게시물 읽기
No. 1035
Re: Re: Re: Re: informix select문에서 index사용법??
작성자
고재성
작성일
2001-09-27 10:00
조회수
7,283

안녕하세요. 정말 님의 글이 도움이 되었습니다.

 

order by 를 쓰지 않고 역순 검색하는 법은 아주 간단하더군요.

index를 만들때... DESC로 만들면 됩니다.

 

예로 create index aaa on table (field DESC)

 

그리고 동일하게 하면 역순 검색이 됩니다.

 

그럼.

 

-- man 님이 쓰신 글:

>> 어라? 원하시는 답이 그게 아니었나...? (민망...-_-;)

>> 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;

>>

>> 이상입니다. (똑같이 적었습니다...^^;)

>>

>> 질문을 정리하여 위 사이트에 가셔서 꼭 물어보세요. 저도 가서 답을 꼭 봐야 겠네여...

[Top]
No.
제목
작성자
작성일
조회
1037인포믹스의 성능은?????
이민철
2001-09-27
6897
1036뭐가 잘못 된거지요...???
김기원
2001-09-27
6999
1047┕>Re: 뭐가 잘못 된거지요...???
케이트
2001-10-04 14:49:59
7180
1032unix_oracle게시판에서 멀티로 인포믹스 db이용하는..
이난이
2001-09-26
6032
1044┕>Re: unix_oracle게시판에서 멀티로 인포믹스 db이용하는..
이윤석
2001-09-30 10:56:08
6299
1029informix select문에서 index사용법??
고재성
2001-09-25
6363
1030┕>Re: informix select문에서 index사용법??
man
2001-09-25 14:50:11
6828
1031 ┕>Re: Re: informix select문에서 index사용법??
고재성
2001-09-25 16:09:33
6368
1033  ┕>Re: Re: Re: informix select문에서 index사용법??
man
2001-09-26 10:21:21
9660
1035   ┕>Re: Re: Re: Re: informix select문에서 index사용법??
고재성
2001-09-27 10:00:57
7283
1027DB에 락이 걸려서 검색이 되지 않는 경우...?
문병진
2001-09-19
5805
1028┕>Re: DB에 락이 걸려서 검색이 되지 않는 경우...?
man
2001-09-20 09:16:54
6601
1026lock 설정에 관한 질문
서상배
2001-09-19
6186
1023informix 책 추천해주세요~
초짜
2001-09-19
5329
1024┕>Re: informix 책 추천해주세요~
장혜정
2001-09-19 18:13:15
6007
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.022초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다