Re: [PERFORM] database encoding with index search problem

2005-08-16 Thread Richard Huxton

wisan watcharinporn wrote:

problem:
how can i configure database that can correct in sorting name and using 
index scan in like '%' search


I think you'll want to read the following then have a quick search of 
the mailing list archives for "opclass" for some examples.

  http://www.postgresql.org/docs/8.0/static/sql-createindex.html
  http://www.postgresql.org/docs/8.0/static/indexes-opclass.html

HTH
--
  Richard Huxton
  Archonet Ltd

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[PERFORM] database encoding with index search problem

2005-08-16 Thread wisan watcharinporn

i have problem in database encoding with indexing

case :1
when i initdb -E win874 mydb and create database with createdb -E win874 
dbname

and create table emp with index in empname field


i can select sorting name correct in thai alphabet
such select empName from emp order by empName;
but in
select empName from emp where empname like 'xxx%'
it not using index scan , it use seq scan so it may slow in find name

case :2
when i initdb mydb (use default) and create database with createdb -E win874 
dbname

and create table emp with index in empname field


i can not select sorting name  correct in thai alphabet
but in
select empName from emp where empname like 'xxx%'
it using index scan , very fast in find name

problem:
how can i configure database that can correct in sorting name and using 
index scan in like '%' search



using FreeBSD 5.4
postgreql 8.0.

_
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq