Skip site navigation (1) Skip section navigation (2)

tsearch performance

From: Chantal Ackermann <chantal(dot)ackermann(at)biomax(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Subject: tsearch performance
Date: 2003-02-27 13:21:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
hi all,

we have a tsearch index on the following table:

            Table "public.sentences"
     Column     |  Type   |     Modifiers
  sentence_id   | bigint  | not null
  puid          | integer |
  py            | integer |
  journal_id    | integer |
  sentence_pos  | integer | not null
  sentence_type | integer | not null default 0
  sentence      | text    | not null
  sentenceidx   | txtidx  | not null
Indexes: sentences_pkey primary key btree (sentence_id),
          sentence_uni unique btree (puid, sentence_pos, sentence),
          sentenceidx_i gist (sentenceidx),
          sentences_puid_i btree (puid),
          sentences_py_i btree (py)

the table contains 50.554.768 rows and is vacuum full analyzed.

The sentenceidx has been filled NOT USING txt2txtidx, but a custom 
implementation that should have had the same effect (parsing into 
words/phrases, deleting stop words). Nevertheless, might this be the 
reason for the very bad performance of the index, or is the table "just" 
to big (I hope not!)?

Note that the index on sentenceidx has not been clustered, yet. I wanted 
to ask first whether I might need to refill the column sentenceidx using 
txt2txtidx. (with so many rows every action has to be reconsidered ;-) )

SELECT sentence FROM sentences WHERE sentenceidx @@ 'amino\\ acid';

                           QUERY PLAN
  Index Scan using sentenceidx_i on sentences
       (cost=0.00..201327.85 rows=50555 width=148)
       (actual time=973940.41..973940.41 rows=0 loops=1)

    Index Cond: (sentenceidx @@ '\'amino acid\''::query_txt)
    Filter: (sentenceidx @@ '\'amino acid\''::query_txt)

  Total runtime: 973941.09 msec
(4 rows)

thank you for any thoughts, hints, tips!

pgsql-performance by date

Next:From: Bruno Wolff IIIDate: 2003-02-27 13:30:11
Subject: Re: Daily crash
Previous:From: Shridhar DaithankarDate: 2003-02-27 13:03:15
Subject: Re: Daily crash

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group