설문조사
PostgreSQL/PPAS 관련 듣고 싶은 교육은
결과보기
EnterpriseDB
총 게시물 95건
목록 글쓰기 이전글 다음글

Primary key 와 인덱스

글쓴이 : PostgresDBA   날짜 : 2013-07-01 (월) 15:09   조회 : 9374 인쇄
PostgreSQL 도 Oracle 과 같은 타디비 처럼 primary key 생성시
해당 컬럼에 대해서 자동으로 인덱스가 생성됩니다.
확인해볼까요?

scottb=> create table test(col1 integer primary key);
CREATE TABLE

scottdb=> \d test
     "public.test" 테이블
 필드명 |  형태   | 기타 조건
--------+---------+-----------
 col1   | integer | not null
인덱스들:
    "test_pkey" PRIMARY KEY, btree (col1)


댓글목록

목록 글쓰기 이전글 다음글

postgresdba.com