Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7jDw-0003lA-CS for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2019 16:42:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7jDt-0004Vr-8F for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2019 16:42:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7jDs-0004Rm-OF for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2019 16:42:32 +0000 Received: from post.visena.com ([46.226.10.50]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7jDp-0006hA-U2 for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2019 16:42:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=visena.com; s=20141101.wh; h=Content-Type:MIME-Version:Subject:In-Reply-To:Message-ID:To:From:Date; bh=YRs6Zda3B1Q1NwWdFvFTWAQpe8FfrpT+aCJIgCpF4fQ=; b=R4aAeAfQl4tmGNWY70IKha43aoi+R8NGvk0NBb4TFZCj6d4RaBVlgAeSMbHtsCgKBiB2yTgzlE1FdUypi6HLJR8zFU+WrP6ZlBsAP4CiD17rpGbFhPU+dYuWJDftDoYGqmGloODAFFSLu9+ka7DQ0Tc8TRGAXXTF+dFTAEH6KNs=; Received: from [10.0.1.10] (helo=tc7-visena.wh.internal.visena.com) by post.visena.com with esmtp (Exim 4.82) (envelope-from ) id 1i7jDm-0003Kd-T6 for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2019 18:42:29 +0200 Received: from localhost ([127.0.0.1] helo=tc7-visena.wh.internal.visena.com) by tc7-visena.wh.internal.visena.com with esmtp (Exim 4.90_1) (envelope-from ) id 1i7jDm-0001tu-RJ for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2019 18:42:26 +0200 Date: Tue, 10 Sep 2019 18:42:26 +0200 (CEST) From: Andreas Joseph Krogh To: pgsql-general@lists.postgresql.org Message-ID: In-Reply-To: <2533.1568132505@sss.pgh.pa.us> Subject: Re: pg full text search very slow for Chinese characters MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_15_2095271971.1568133746735" X-Mailer: Visena Mail 2.2.116 X-Spam-Score: -1.0 X-Spam-Report: SpamAssasin (score=-1.0, required 5.0 ALL_TRUSTED=-1,HTML_MESSAGE=0.001) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_15_2095271971.1568133746735 Content-Type: multipart/related; boundary="----=_Part_16_1852622206.1568133746735" ------=_Part_16_1852622206.1568133746735 Content-Type: multipart/alternative; boundary="----=_Part_17_38741608.1568133746755" ------=_Part_17_38741608.1568133746755 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable P=C3=A5 tirsdag 10. september 2019 kl. 18:21:45, skrev Tom Lane >: Jimmy Huang writes: > I tried pg_trgm and my own customized token parser=20 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 th= e=20 DB on virtual servers (~5 years ago) and it turned out we hit the write-cac= he=20 limit (then 8GB), which resulted in ~1MB/s IO thruput. Running iozone might= =20 help tracing down IO-problems. -- Andreas Joseph Krogh ------=_Part_17_38741608.1568133746755 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable
P=C3=A5 tirsdag 10. september 2019 kl. 18:21:45, skrev Tom Lane <tgl@sss.pgh.pa.us>:
Jim= my 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).=C2=A0 I don't know of any comparable issue in the core tsvector logic, though.=C2=A0 The numbers you're quoting do sound quite awf= ul,
but I share Cory's suspicion that it's something about your setup rather than an inherent Postgres issue.

regards, tom lane
=C2=A0
=C2=A0
We experienced quite awful performance when we hosted the DB on virtua= l=C2=A0servers (~5 years ago) and it turned out we hit the write-cache limi= t (then 8GB), which resulted in ~1MB/s IO thruput.
Running iozone might help tracing down IO-problems.
=C2=A0
=C2=A0
">
--
Andreas Joseph Krogh
------=_Part_17_38741608.1568133746755-- ------=_Part_16_1852622206.1568133746735-- ------=_Part_15_2095271971.1568133746735--