pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mitch Vincent <mitch@venux.net>
To: Vassili A Akimov <vassili@erols.com>
To: pgsql-sql@postgresql.org
To: pgsql-general@postgresql.org
Subject: Re: Need to improve performance
Date: Fri, 23 Jun 2000 10:53:41 -0400
Message-ID: <006d01bfdd22$d3129460$0300000a@doot.org> (raw)
References: <395373C5.B1C2A566@erols.com>

> vacuum;
> vacuum analyze;
> select f1.id from app_fti f1, app_fti f2 where f1.string~*'visual' and
> f2.string~*'basic' and f1.id=f2.id;

Use ~*'^basic'

It will use the indexes I believe. Also, enable likeplanning (look in
contrib/likeplanning) -- it will speed things up too.. If that doesn't help
then use EXPLAIN to get your query plan and post it, I'll try to help
further... I'm doing this exact thing, so have some experience on tweaking
it (Thanks again Tom!)  :-)

I'd bet what's happening is you're doing a seq scan, not something you want
to do on that big of a table. (I know that's what's happening with using
~*'whatever' )

Make good use of the stop words in fti.c too (be sure to order them, it's a
binary search).

Hope that helps..


-Mitch





view thread (5+ messages)  latest in thread

Message-ID: <006d01bfdd22$d3129460$0300000a@doot.org>
Permalink:  ../006d01bfdd22$d3129460$0300000a@doot.org/
Also on:    postgresql.org/message-id/006d01bfdd22$d3129460$0300000a@doot.org

 · 

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 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-sql@postgresql.org
  Cc: mitch@venux.net, vassili@erols.com, pgsql-general@postgresql.org
  Subject: Re: Need to improve performance
  In-Reply-To: <006d01bfdd22$d3129460$0300000a@doot.org>
  References: <395373C5.B1C2A566@erols.com> <006d01bfdd22$d3129460$0300000a@doot.org>

* 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