pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matthew Wakeling <matthew@flymine.org>
To: pgsql-performance@postgresql.org
Subject: Re: Tsearch2 Initial Search Speed
Date: Tue, 17 Jun 2008 12:04:06 +0100 (BST)
Message-ID: <Pine.LNX.4.64.0806171202130.3987@aragorn.flymine.org> (raw)
In-Reply-To: <485797D4.7010201@selestial.com>
References: <4856A91F.1020001@selestial.com>
	<200806161124.57543@hal.medialogik.com>
	<485789C1.3000803@selestial.com>
	<485797D4.7010201@selestial.com>

On Tue, 17 Jun 2008, Howard Cole wrote:
> I think I may have answered my own question partially, the problem may be how 
> I structure the query.
>
> Original statement:
>
> "Nested Loop  (cost=4.40..65.08 rows=16 width=8)"
> "  ->  Function Scan on q  (cost=0.00..0.01 rows=1 width=32)"
> "  ->  Bitmap Heap Scan on email  (cost=4.40..64.87 rows=16 width=489)"
> "        Filter: (email.fts @@ q.q)"
> "        ->  Bitmap Index Scan on email_fts_index  (cost=0.00..4.40 rows=16 width=0)"
> "              Index Cond: (email.fts @@ q.q)"
>
> Second statement:
>
> "Bitmap Heap Scan on email  (cost=4.40..64.91 rows=16 width=8)"
> "  Filter: (fts @@ '''howard'''::tsquery)"
> "  ->  Bitmap Index Scan on email_fts_index  (cost=0.00..4.40 rows=16 width=0)"
> "        Index Cond: (fts @@ '''howard'''::tsquery)"

As far as I can see, that shouldn't make any difference. Both queries 
still do the bitmap heap scan, and have almost exactly the same cost.

Matthew

-- 
Lord grant me patience, and I want it NOW!



view thread (18+ messages)  latest in thread

Message-ID: <Pine.LNX.4.64.0806171202130.3987@aragorn.flymine.org>
Permalink:  ../Pine.LNX.4.64.0806171202130.3987@aragorn.flymine.org/
Also on:    postgresql.org/message-id/Pine.LNX.4.64.0806171202130.3987@aragorn.flymine.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-performance@postgresql.org
  Cc: matthew@flymine.org
  Subject: Re: Tsearch2 Initial Search Speed
  In-Reply-To: <Pine.LNX.4.64.0806171202130.3987@aragorn.flymine.org>
  References: <4856A91F.1020001@selestial.com> <200806161124.57543@hal.medialogik.com> <485789C1.3000803@selestial.com> <485797D4.7010201@selestial.com> <Pine.LNX.4.64.0806171202130.3987@aragorn.flymine.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