Re: Are indexes blown?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Are indexes blown?
Дата
Msg-id 47B5756A.50105@archonet.com
обсуждение исходный текст
Ответ на Are indexes blown?  ("Phoenix Kiula" <phoenix.kiula@gmail.com>)
Ответы Re: Are indexes blown?
Список pgsql-general
Phoenix Kiula wrote:
> Hi,
>
> I have an index on the user_id field in the query below:
>
>    myuser=# delete from clients where user_id like '64.22.91.%';
>    DELETE 22
>    Time: 220324.975 ms
>
> Is there any reason why it's taking 220 seconds to run this simple
> query? There are about 3 million rows in this table.

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.

--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: "Shoaib Mir"
Дата:
Сообщение: Re: Are indexes blown?
Следующее
От: "Phoenix Kiula"
Дата:
Сообщение: Re: Are indexes blown?