Re: Are indexes blown?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Are indexes blown?
Date: 2008-02-15 12:40:38
Message-ID: 47B58846.5050102@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Phoenix Kiula wrote:
> On 15/02/2008, Richard Huxton <dev(at)archonet(dot)com> wrote:
>
>> First guess is that it's not using the index. What does
>> EXPLAIN ANALYSE SELECT user_id FROM clients WHERE user_id LIKE '...'
>> show?
>>
>> Check the list archives for locale and like and text_pattern_ops too -
>> that's a good place to check.
>
>
> There is nothing to do with locale. The same database has been working
> just fine for 2 years. Why should this be an issue now?

No reason, but you hadn't said this was a change in behaviour, just that
it seemed slow.

> When I ran the EXPLAIN SELECT, the database was hanging. Or taking too
> much time (waiting for 5 minutes), or whatever. I cancelled it.
>
> That's the problem. It works, then it doesn't. Then it works again. I
> am guessing it could be the load, but there's nothing new in terms of
> load that should be causing this!

Ah, more new information! This does seem to point to the load,
particularly if it's exactly the same query each time. So what do
top/vmstat etc show for these "go-slow" periods?

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message fdu.xiaojf@gmail.com 2008-02-15 12:49:02 a newbie question on table design
Previous Message Balázs Klein 2008-02-15 12:29:37 Re: dynamic crosstab