pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: jesper@krogh.cc
To: tgl@sss.pgh.pa.us
Cc: pgsql-performance@postgresql.org
Cc: oleg@sai.msu.su
Cc: teodor@sigaev.ru
Subject: Re: Queryplan within FTS/GIN index -search.
Date: Mon, 02 Nov 2009 16:06:00 -0600
Message-ID: <4AEF0369020000250002C183@gw.wicourts.gov> (raw)

Tom Lane <tgl@sss.pgh.pa.us> wrote:
 
> Any sane text search application is going to try to filter out
> common words as stopwords; it's only the failure to do that that's
> making this run slow.
 
Imagine a large table with a GIN index on a tsvector.  The user wants
a particular document, and is sure four words are in it.  One of them
only appears in 100 documents.  The other three each appear in about
a third of the documents.  Is it more sane to require the user to
wait for a table scan or to make them wade through 100 rows rather
than four?
 
I'd rather have the index used for the selective test, and apply the
remaining tests to the rows retrieved from the heap.
 
-Kevin



view thread (8+ messages)  latest in thread

Message-ID: <4AEF0369020000250002C183@gw.wicourts.gov>
Permalink:  ../4AEF0369020000250002C183@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4AEF0369020000250002C183@gw.wicourts.gov

 · 

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-performance@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, jesper@krogh.cc, tgl@sss.pgh.pa.us, oleg@sai.msu.su, teodor@sigaev.ru
  Subject: Re: Queryplan within FTS/GIN index -search.
  In-Reply-To: <4AEF0369020000250002C183@gw.wicourts.gov>
  References: <4AEF0369020000250002C183@gw.wicourts.gov>

* 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