pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephan Vollmer <svollmer@gmx.de>
Cc: pgsql-general@postgresql.org
Subject: Re: Creation of tsearch2 index is very slow
Date: Fri, 20 Jan 2006 10:35:21 -0500
Message-ID: <17454.1137771321@sss.pgh.pa.us> (raw)
In-Reply-To: <43D0ED57.1020608@gmx.de>
References: <43D0ED57.1020608@gmx.de>

Stephan Vollmer <svollmer@gmx.de> writes:
> I noticed that the creation of a GIST index for tsearch2 takes very
> long - about 20 minutes. CPU utilization is 100 %, the resulting
> index file size is ~25 MB. Is this behaviour normal?

This has been complained of before.  GIST is always going to be slower
at index-building than btree; in the btree case there's a simple optimal
strategy for making an index (ie, sort the keys) but for GIST we don't
know anything better to do than insert the keys one at a time.

However, I'm not sure that anyone's tried to do any performance
optimization on the GIST insert code ... there might be some low-hanging
fruit there.  It'd be interesting to look at a gprof profile of what the
backend is doing during the index build.  Do you have the ability to do
that, or would you be willing to give your data to someone else to
investigate with?  (The behavior is very possibly data-dependent, which
is why I want to see a profile with your specific data and not just some
random dataset or other.)

			regards, tom lane



view thread (38+ messages)  latest in thread

Message-ID: <17454.1137771321@sss.pgh.pa.us>
Permalink:  ../17454.1137771321@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/17454.1137771321@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, svollmer@gmx.de, pgsql-general@postgresql.org
  Subject: Re: Creation of tsearch2 index is very slow
  In-Reply-To: <17454.1137771321@sss.pgh.pa.us>

* 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