Re: query time

Поиск
Список
Период
Сортировка
От WireSpot
Тема Re: query time
Дата
Msg-id b2d4b0380502020719b8611d9@mail.gmail.com
обсуждение исходный текст
Ответ на Re: query time  (Richard Huxton <dev@archonet.com>)
Ответы Re: query time
Список pgsql-general
On Wed, 02 Feb 2005 14:48:41 +0000, Richard Huxton <dev@archonet.com> wrote:
> Think about it, you'd need an index that ordered use_name so that
> (john_doe, AAAAAjohn_doe, Zjohn_doe1234) were all next to each other.
>
> If you anchor the search (LIKE 'john_doe%') and are using the C locale
> then an index can be used (because it's the same as >='john_doe' AND
> <'john_dof').

Unfortunately, all my cases are LIKE '%john_doe'. So I'm guessing I'll
never get an index.

How about the response time when doing both LIKE user_name and ORDER
BY timestamp? Why does it get blown out of the water like that, from 5
and 5 to 2000 ms? If a LIKE by itself takes 5 ms and an ORDER by
itself takes 5 ms... Doesn't it grab the results matching the LIKE and
the ORDER only those?

While we're on the subject of indexes, is there any way I can speed up
a SELECT DISTINCT user_name FROM log_entries? With 200.000 entries I
get like 46 seconds on this one.

I apologise if these things are already in the manual, I'm only now
getting used to it and I don't find some things right away.

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

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: capturing/viewing sort_mem utilization on a per query basis
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Does indexing help >= as well as = for integer columns?