Re: tsearch2 question (was: Poor performance on seq

From: "Luke Lonergan" <llonergan(at)greenplum(dot)com>
To: "Laszlo Nagy" <gandalf(at)designaproduct(dot)biz>, pgsql-performance(at)postgresql(dot)org
Subject: Re: tsearch2 question (was: Poor performance on seq
Date: 2006-09-12 18:36:10
Message-ID: C12C4C2A.30B55%llonergan@greenplum.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Lazlo,

On 9/12/06 10:01 AM, "Laszlo Nagy" <gandalf(at)designaproduct(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Dave Dutcher 2006-09-12 19:05:35 Re: [Fwd: Re: Performance problem with Sarge compared
Previous Message Piñeiro 2006-09-12 18:28:28 Re: [Fwd: Re: Performance problem with Sarge compared