음, 이런것도 있네요..
제가 설치를 잘 못한건지 bug 인지,
무심코 눈에 띄었군요
pgsql=# \l List of databases Name | Owner | Encoding -----------+-------+---------- pgsql | pgsql | EUC_KR template0 | pgsql | EUC_KR template1 | pgsql | EUC_KR (3 rows) pgsql=# pgsql=# EXPLAIN ANALYZE select * from bank_code where name like '한국%'; QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------- Index Scan using idx_bank_code on bank_code (cost=0.00..387.22 rows=113 width=394) (actual time=0.078..0.310 rows=42 loops=1) Index Cond: (((name)::text >= '한국'::character varying) AND ((name)::text < '한군'::character varying)) Filter: ((name)::text ~~ '한국%'::text) Total runtime: 0.448 ms (4 rows) Time: 1.997 ms pgsql=# pgsql=# EXPLAIN ANALYZE select * from bank_code where name like '한구%'; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------- Index Scan using idx_bank_code on bank_code (cost=0.00..387.22 rows=113 width=394) (actual time=0.055..0.055 rows=0 loops=1) Index Cond: (((name)::text >= '한구'::character varying) AND ((name)::text < '한국'::character varying)) Filter: ((name)::text ~~ '한구%'::text) Total runtime: 0.155 ms (4 rows) Time: 1.735 ms pgsql=# pgsql=# EXPLAIN ANALYZE select * from zipcode where dong like '공항%'; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------- Index Scan using idx_dong on zipcode (cost=0.00..797.01 rows=239 width=207) (actual time=0.293..0.375 rows=15 loops=1) Index Cond: (((dong)::text >= '공항'::character varying) AND ((dong)::text < '공해'::character varying)) Filter: ((dong)::text ~~ '공항%'::text) Total runtime: 0.491 ms (4 rows) Time: 2.486 ms pgsql=#
잘 보시면 아시겠지만,
인덱스 컨디션이 나오는 부분에 AND 뒤쪽으로
글자가 한칸씩 밀립니다.
문자셋에서 하나씩 밀리는것 같은데..
설치를 잘못한것 같진 않은데.. 버그일까요? -0-
참, 결과는 문제없이 나옵니다. 단지 저 보여주는 곳에서만 저러네요.. |