Re: ltree + gist index performance degrades significantly over a night

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: CG <cgg007(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ltree + gist index performance degrades significantly over a night
Date: 2006-02-24 19:40:00
Message-ID: 20060224194000.GC9390@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 24, 2006 at 09:44:37AM -0800, CG wrote:
>
>
> --- Martijn van Oosterhout <kleptog(at)svana(dot)org> wrote:
>
> > That's very odd. Like the other person said, do you vacuum and analyse?
> > But my question is: is it using the index? What does EXPLAIN / EXPLAIN
> > ANALYZE tell you?
>
> data=# explain select * from search where search_vector ~ '*.o.r.l.*'::lquery;

<snip>

> data=# explain analyze select * from search where search_vector ~
> '*.o.r.l.*'::lquery;

<snip>
> Total runtime: 197000.061 ms

Ouch! The index is obviously not very good in this case. Unfortunatly
it's not clear where the slowdown is. You'd probably need to recompile
postgresql with profiling to find exactly where it's going wrong.

Quick test though, if you disable the index (set enable_indexscan=off)
so it does a seqscan, is it faster or slower? By how much? i.e. is it
helping much.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andrus Moor 2006-02-24 20:32:58 Wrong length of bytea field
Previous Message Bruce Momjian 2006-02-24 18:46:08 Re: How much clustered?