pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: andreas@visena.com
Cc: pgsql-general@lists.postgresql.org
Subject: Re: pg full text search very slow for Chinese characters
Date: Wed, 11 Sep 2019 11:34:17 +0900 (Tokyo Standard Time)
Message-ID: <20190911.113417.69552735.horikyota.ntt@gmail.com> (raw)
In-Reply-To: <VisenaEmail.3.8750116fce15432e.16d1c0b2b28@tc7-visena>
References: <2533.1568132505@sss.pgh.pa.us>
	<VisenaEmail.3.8750116fce15432e.16d1c0b2b28@tc7-visena>

Hi.

At Tue, 10 Sep 2019 18:42:26 +0200 (CEST), Andreas Joseph Krogh <andreas@visena.com> wrote in <VisenaEmail.3.8750116fce15432e.16d1c0b2b28@tc7-visena>
> På tirsdag 10. september 2019 kl. 18:21:45, skrev Tom Lane <tgl@sss.pgh.pa.us 
> <mailto:tgl@sss.pgh.pa.us>>: Jimmy Huang <jimmy_huang@live.com> writes:
>  > I tried pg_trgm and my own customized token parser 
> https://github.com/huangjimmy/pg_cjk_parser
> 
>  pg_trgm is going to be fairly useless for indexing text that's mostly
>  multibyte characters, since its unit of indexable data is just 3 bytes
>  (not characters). I don't know of any comparable issue in the core
>  tsvector logic, though. The numbers you're quoting do sound quite awful,
>  but I share Cory's suspicion that it's something about your setup rather
>  than an inherent Postgres issue.
> 
>  regards, tom lane We experienced quite awful performance when we hosted the 
> DB on virtual servers (~5 years ago) and it turned out we hit the write-cache 
> limit (then 8GB), which resulted in ~1MB/s IO thruput. Running iozone might 
> help tracing down IO-problems. --
>  Andreas Joseph Krogh

Multibyte characters also quickly bloats index by many many small
buckets for every 3-characters combination of thouhsand of
characters, which makes it useless.

pg_bigm based on bigram/2-gram works better on multibyte
characters.

https://pgbigm.osdn.jp/index_en.html

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center





view thread (8+ messages)

Message-ID: <20190911.113417.69552735.horikyota.ntt@gmail.com>
Permalink:  ../20190911.113417.69552735.horikyota.ntt@gmail.com/
Also on:    postgresql.org/message-id/20190911.113417.69552735.horikyota.ntt@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: horikyota.ntt@gmail.com, andreas@visena.com
  Subject: Re: pg full text search very slow for Chinese characters
  In-Reply-To: <20190911.113417.69552735.horikyota.ntt@gmail.com>
  References: <2533.1568132505@sss.pgh.pa.us> <VisenaEmail.3.8750116fce15432e.16d1c0b2b28@tc7-visena> <20190911.113417.69552735.horikyota.ntt@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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