pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Luke Lonergan <llonergan@greenplum.com>
To: Laszlo Nagy <gandalf@designaproduct.biz>
To: pgsql-performance@postgresql.org
Subject: Re: tsearch2 question (was: Poor performance on seq
Date: Tue, 12 Sep 2006 11:36:10 -0700
Message-ID: <C12C4C2A.30B55%llonergan@greenplum.com> (raw)
In-Reply-To: <4506E7EC.8080605@designaproduct.biz>

Lazlo,

On 9/12/06 10:01 AM, "Laszlo Nagy" <gandalf@designaproduct.biz> wrote:

> zeusd1=> explain analyze select id from product_search where name_desc
> like '%Mug%';
>                                                        QUERY PLAN
> ------------------------------------------------------------------------------
> ------------------------------------------
>  Seq Scan on product_search  (cost=0.00..54693.34 rows=36487 width=8)
> (actual time=20.036..2541.971 rows=91399 loops=1)
>    Filter: (name_desc ~~ '%Mug%'::text)
>  Total runtime: 2581.272 ms
> (3 rows)
> 
> The total runtime remains below 3 sec in all cases.

By creating a table with only the name field you are searching, you have
just reduced the size of rows so that they fit in memory.  That is why your
query runs faster.

If your searched data doesn't grow, this is fine.  If it does, you will need
to fix your disk drive OS problem.

- Luke





view thread (2+ messages)

Message-ID: <C12C4C2A.30B55%llonergan@greenplum.com>
Permalink:  ../C12C4C2A.30B55%25llonergan@greenplum.com/
Also on:    postgresql.org/message-id/C12C4C2A.30B55%llonergan@greenplum.com

 · 

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: llonergan@greenplum.com, gandalf@designaproduct.biz
  Subject: Re: tsearch2 question (was: Poor performance on seq
  In-Reply-To: <C12C4C2A.30B55%llonergan@greenplum.com>

* 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