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 1i7sSk-0006Ja-Jb for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2019 02:34:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i7sSi-0000L8-Un for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2019 02:34:28 +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 1i7sSi-0000Fm-F8 for pgsql-general@lists.postgresql.org; Wed, 11 Sep 2019 02:34:28 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i7sSf-0003QJ-Nw for pgsql-general@lists.postgresql.org; Wed, 11 Sep 2019 02:34:28 +0000 Received: by mail-pg1-x543.google.com with SMTP id j191so178099pgd.3 for ; Tue, 10 Sep 2019 19:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=rHyc6WGZU5SdilVlKNPS9+4Sl/st9Af5smKJUmsG6bs=; b=J3N6pPuw1+M4J3JgHlQDC8FGsH5kwGxWX1OiMic3UHm1GCws7YBIo1I64roHDyHgF4 ru7I2FXFMWAw0oDWMEKZKueKhYguciy24cS5k9PCAZxDEL4t5uudg3088BKZcgQK0inp oDt37BimmJSRtEIE6fg9IKe/SxsVVQiDCJnnkP8MDc8358xlfNUXEgvV9JgTYBl3PpPS QiGjX4cKPTBBpeNRd8OnbQboS8vjvYWPxOlROyWRqqkSwcJDzuaYO3aGuTmF8V6rKTqb jNrZbqJ2CDVlZDZBdVDgddy99YPjdmKF5XXNixzFTy3ib+GHe1fk186rryi5KtOH50Vz WV5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=rHyc6WGZU5SdilVlKNPS9+4Sl/st9Af5smKJUmsG6bs=; b=C40clv76AeY535kkz2be2XE1Ai9EKQCiPsLhvqVpv7FauXhTtpeHb8hgHdFmBjieRv 8mCKsOQABxjquaAbrMLEqNdGz1o6YU910ylakMRis2hkMwCcR+dMwaIcDlt/bqbyKBKw XE969Tqr12QYbln5qO7QXpLt9klhlkKmbiBKO+yCln/UDX8dd+5pidtcuyczXFhf1RXR ZxVcW47p3x0ZKNwLF8JtlZSPSrcYEbFUJIxbw0ykIi54o4lFy4Q6vNwe3i3emCAFP++F lEvEykhbqolHAc3GQkfAxTPAFLbFlJeFPZ6KjP1vnn3AefJ15WbJ5CJSDHpPpZPFHL3H rnuw== X-Gm-Message-State: APjAAAVMDS1pDCbiHxMHzBzjGxzr4YcDiGWyvsNls9WABAy4vhYFdnOF ParpOKgfhRS/hELMfqY+fpo= X-Google-Smtp-Source: APXvYqzzOmIxzz0J0YKe0kp7WlBs5cf8f5CbKuj2PRbPvxDVLhon1on8fs7VAldXWsOjcrKy8PVCNg== X-Received: by 2002:a17:90a:617:: with SMTP id j23mr2968114pjj.130.1568169263429; Tue, 10 Sep 2019 19:34:23 -0700 (PDT) Received: from localhost (w204177.dynamic.ppp.asahi-net.or.jp. [121.1.204.177]) by smtp.gmail.com with ESMTPSA id k25sm17587745pgt.53.2019.09.10.19.34.21 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 10 Sep 2019 19:34:23 -0700 (PDT) Date: Wed, 11 Sep 2019 11:34:17 +0900 (Tokyo Standard Time) Message-Id: <20190911.113417.69552735.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 From: Kyotaro Horiguchi In-Reply-To: References: <2533.1568132505@sss.pgh.pa.us> User-Agent: Mew version 6.5 on Emacs 22.2 / Mule 5.0 =?iso-2022-jp?B?KBskQjpnGyhCKQ==?= / Meadow-3.01-dev (TSUBO-SUMIRE) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi. At Tue, 10 Sep 2019 18:42:26 +0200 (CEST), Andreas Joseph Krogh wrote in > P=E5 tirsdag 10. september 2019 kl. 18:21:45, skrev Tom Lane >: Jimmy Huang write= s: > > 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 mostl= y > multibyte characters, since its unit of indexable data is just 3 byt= es > (not characters). I don't know of any comparable issue in the core > tsvector logic, though. The numbers you're quoting do sound quite aw= ful, > but I share Cory's suspicion that it's something about your setup ra= ther > than an inherent Postgres issue. > = > regards, tom lane We experienced quite awful performance when we hos= ted the = > DB on virtual servers (~5 years ago) and it turned out we hit the wri= te-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