[groonga-dev,04641] Re: index row, maximum size is 8191

Back to archive index

Kouhei Sutou kou****@clear*****
2018年 7月 25日 (水) 10:08:41 JST


須藤です。

In <00f401d4230a$f58e8430$e0ab8c90$@mirror.ocn.ne.jp>
  "[groonga-dev,04640] Re: index row, maximum size is 8191" on Tue, 24 Jul 2018 13:58:27 +0900,
  内山敏郎 <toshio_uchiy****@mirro*****> wrote:

> explain verbose select content from subtitled where content &@~ 'ゴルフ';
> 
> 現在の結果は、
> 
> moovle=# explain verbose select content from subtitled where content &@~ 'ゴ
> ルフ';
>                                                      QUERY PLAN
> 
> ----------------------------------------------------------------------------
> ----
> -------------------------------------
>  Index Only Scan using subtitled2_pgroonga_content_idx on public.subtitled
> (cos
> t=0.00..1759.40 rows=1479 width=366)
>    Output: content
>    Index Cond: (subtitled.content &@~ 'ゴルフ'::text)
> (3 行)
> 
> moovle=#
> 
> です。
>  しかし、自分で調べて、pg_hint_plan を用いて、Index Only Scan を Index Scan
>> することで、エラーが回避できることが分かりました。PGroonga の問題ではなく
> て、
> PGroongaのインデックスを使っているときに、PostgreSQL が Index Only Scan の
> プランで query を実行するためのようです。
>  PGroonga をインストールしたらこの現象がなくなるようにできればより良いです
> が、
> 現状でも回避できることが分かりました。
>  ありがとうございます。

うーん、サイズが大きいときはIndex Only Scanを使わないように
しているつもりなんですよねぇ。そこのロジックを調整したいので
再現するデータを提供してもらえないでしょうか?たぶん、
subtitled.contentに入っている一番大きいデータだけで再現する
ような気がします。

うまく調整できればpg_hint_planを使わなくて済むようになります。


-- 
須藤 功平 <kou****@clear*****>
株式会社クリアコード <http://www.clear-code.com/>

Groongaベースの全文検索システムを総合サポート:
  http://groonga.org/ja/support/
データ処理ツールの開発:
  http://www.clear-code.com/blog/2018/7/11.html




groonga-dev メーリングリストの案内
Back to archive index