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

Back to archive index

内山敏郎 toshio_uchiy****@mirro*****
2018年 7月 30日 (月) 10:09:51 JST


須藤さま

 お世話になります。内山です。
 ご対応ありがとうございます。
INSERT を使わないと Index Only Scan になると
いうことですが、psql -f ファイル名で、
データを登録した場合(COPY だと思います)
は Index Only Scan になりますでyしょうか。
 運用上、SQL の INSERT 文でデータの登録は
していません。psql -f ファイル名でデータ登録を
行っています。
 少し心配ですが、その場合でも pg_hint_plan を
使えば大丈夫ですね。
 よろしくお願いします。

-----Original Message-----
From: groon****@lists*****
[mailto:groon****@lists*****] On Behalf Of Kouhei Sutou
Sent: Friday, July 27, 2018 11:10 AM
To: groon****@lists*****
Subject: [groonga-dev,04647] Re: index row, maximum size is 8191

須藤です。

データの提供ありがとうございます。

text[]のケースでもデータサイズが大きい場合はIndex Only Scan
を使わないようにしたので次のリリースからはpg_hint_planを使わ
なくても大丈夫になります。

ただ、INSERT時にサイズの計算をしているので、インデックスの再
作成または大きいデータの再INSERTをしないと引き続きIndex Only
Scanになってしまうので注意してください。

In <20180****@clear*****>
  "[groonga-dev,04646] Re: index row, maximum size is 8191" on Thu, 26 Jul
2018 16:17:51 +0900 (JST),
  Kouhei Sutou <kou****@clear*****> wrote:

> 須藤です。
>
> いろいろありがとうございます。
>
> もろもろダウンロードさせてもらえるとうれしいです!
>
> In <01ec01d424a3$a06575a0$e13060e0$@mirror.ocn.ne.jp>
>   "[groonga-dev,04645] Re: index row, maximum size is 8191" on Thu, 26 Jul
2018 14:43:48 +0900,
>   内山敏郎 <toshio_uchiy****@mirro*****> wrote:
>
>> 須藤さま
>>
>>  お世話になります。内山です。
>>
>>  ようやく、text 型の配列を全部連結した場合の文字列長
>> をSQLで算出することができ、content カラムに一番長いデータ
>> が入っている行を取得できました。
>>  こちらのデータもご準備しました。
>>  いかがでしょうか。よろしくお願いします。
>>
>> -----Original Message-----
>> From: groon****@lists*****
>> [mailto:groon****@lists*****] On Behalf Of 内山敏郎
>> Sent: Thursday, July 26, 2018 10:01 AM
>> To: '全文検索エンジンGroonga開発メーリングリスト'
>> Subject: [groonga-dev,04644] Re: index row, maximum size is 8191
>>
>> 須藤さま
>>
>>  お世話になります。内山です。
>>
>>  これ以上データを減らすとエラーが再現できなくなる。
>> プランが Bitmap Index Scan になる。ところまでデータを
>> 減らしました。また、テーブルを pg_dump でバックアップして
>> bzip2 で圧縮することにより、2.4GB となりました。
>>  いかがでしょうか。よろしくお願いします。
>>
>> -----Original Message-----
>> From: groon****@lists*****
>> [mailto:groon****@lists*****] On Behalf Of 内山敏郎
>> Sent: Wednesday, July 25, 2018 3:05 PM
>> To: '全文検索エンジンGroonga開発メーリングリスト'
>> Subject: [groonga-dev,04643] Re: index row, maximum size is 8191
>>
>> 須藤さま
>>
>>  お世話になります。内山です。
>>
>>>そこのロジックを調整したいので
>>>再現するデータを提供してもらえないでしょうか?
>>
>> こちらで、可能な範囲で小さくしたデータを作りましたが
>> 8GB あります。PostgreSQL のテーブルを pg_dump で
>> バックアップした形式なので、psql -f temp.sql すれば
>> テーブルを再現することができると思います。エラーも
>> 再現できるはずです。
>>  これで良ければ、ダウンロード URL をお送りします。
>> よろしくお願いします。
>>
>> -----Original Message-----
>> From: groon****@lists*****
>> [mailto:groon****@lists*****] On Behalf Of Kouhei Sutou
>> Sent: Wednesday, July 25, 2018 10:09 AM
>> To: groon****@lists*****
>> Subject: [groonga-dev,04641] Re: index row, maximum size is 8191
>>
>> 須藤です。
>>
>> 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 mailing list
>> groon****@lists*****
>> https://lists.osdn.me/mailman/listinfo/groonga-dev
>>
>> _______________________________________________
>> groonga-dev mailing list
>> groon****@lists*****
>> https://lists.osdn.me/mailman/listinfo/groonga-dev
>>
>> _______________________________________________
>> groonga-dev mailing list
>> groon****@lists*****
>> https://lists.osdn.me/mailman/listinfo/groonga-dev
>>
>> _______________________________________________
>> groonga-dev mailing list
>> groon****@lists*****
>> https://lists.osdn.me/mailman/listinfo/groonga-dev
>
> _______________________________________________
> groonga-dev mailing list
> groon****@lists*****
> https://lists.osdn.me/mailman/listinfo/groonga-dev

_______________________________________________
groonga-dev mailing list
groon****@lists*****
https://lists.osdn.me/mailman/listinfo/groonga-dev




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