pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
database encoding with index search problem
2+ messages / 2 participants
[nested] [flat]

* database encoding with index search problem
@ 2005-08-16 07:01  wisan watcharinporn <maccran@hotmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: wisan watcharinporn @ 2005-08-16 07:01 UTC (permalink / raw)
  To: pgsql-performance

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 'xxxx%' 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/




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: database encoding with index search problem
@ 2005-08-16 08:23  Richard Huxton <dev@archonet.com>
  parent: wisan watcharinporn <maccran@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Huxton @ 2005-08-16 08:23 UTC (permalink / raw)
  To: wisan watcharinporn <maccran@hotmail.com>; +Cc: pgsql-performance

wisan watcharinporn wrote:
> problem:
> how can i configure database that can correct in sorting name and using 
> index scan in like 'xxxx%' 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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-08-16 08:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 07:01 database encoding with index search problem wisan watcharinporn <maccran@hotmail.com>
2005-08-16 08:23 ` Richard Huxton <dev@archonet.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox