From: Jimmy Huang <jimmy_huang@live.com>
To: Michael Lewis <mlewis@entrata.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 16:20:57 +0000
Message-ID: <A9CC085A-FD81-4311-96A0-1183C237B7BC@live.com> (raw)
In-Reply-To: <CAHOFxGqupzUJ206C5m=F2hPdmQaOrutidytFdCaoPG2Y1X_rkA@mail.gmail.com>
References: <4C0635DF-420D-42BE-B89B-940882F6A160@live.com>
<CAHOFxGqupzUJ206C5m=F2hPdmQaOrutidytFdCaoPG2Y1X_rkA@mail.gmail.com>
It is all default values.
I just check maintenance_work_mem and indeed it is 64MB.
At first I gave 2GB ram to docker and later I increased ram to 4GB.
It did not make much difference when ram increased from 2GB to 4GB.
I will try increasing maintenance_work_mem and see if it helps.
发件人: Michael Lewis <mlewis@entrata.com>
日期: 2019年9月11日 星期三 上午12:11
收件人: 黄 少君 <jimmy_huang@live.com>
抄送: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
主题: Re: pg full text search very slow for Chinese characters
>My postgres instance is based on docker image postgres:11 and runs on my MacBook Pro i7 16GB.
How much ram and such did you give to this vm?
>To my surprise, postgres 11 is extremely slow when creating a full text index. I added a column of tsvector type and tried to create an index on that column. Pg could not finish creating a GIN index for a long time and I had to cancel the execution.I then tried to create a partial full text index for 500 rows and it took postgres 2 to 3 minutes to create the index.
Did you customize any config? maintenance_work_mem specifically would be relevant to the time to create an index and default value is only 64MB. Especially if you are running a spinning hard drive and not ssd, then this could be problematic.
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: jimmy_huang@live.com, mlewis@entrata.com
Subject: Re: pg full text search very slow for Chinese characters
In-Reply-To: <A9CC085A-FD81-4311-96A0-1183C237B7BC@live.com>
References: <4C0635DF-420D-42BE-B89B-940882F6A160@live.com> <CAHOFxGqupzUJ206C5m=F2hPdmQaOrutidytFdCaoPG2Y1X_rkA@mail.gmail.com> <A9CC085A-FD81-4311-96A0-1183C237B7BC@live.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