pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jimmy Huang <jimmy_huang@live.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: pg full text search very slow for Chinese characters
Date: Tue, 10 Sep 2019 12:21:45 -0400
Message-ID: <2533.1568132505@sss.pgh.pa.us> (raw)
In-Reply-To: <4C0635DF-420D-42BE-B89B-940882F6A160@live.com>
References: <4C0635DF-420D-42BE-B89B-940882F6A160@live.com>

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





view thread (8+ messages)  latest in thread

Message-ID: <2533.1568132505@sss.pgh.pa.us>
Permalink:  ../2533.1568132505@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2533.1568132505@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, jimmy_huang@live.com
  Subject: Re: pg full text search very slow for Chinese characters
  In-Reply-To: <2533.1568132505@sss.pgh.pa.us>
  References: <4C0635DF-420D-42BE-B89B-940882F6A160@live.com> <2533.1568132505@sss.pgh.pa.us>

* 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