Re: Fwd: Help required on query performance

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Fwd: Help required on query performance
Дата
Msg-id dcc563d11001312116u489f7c3dvcf576b3881e7760a@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fwd: Help required on query performance  (Dave Clements <dclements89@gmail.com>)
Список pgsql-sql
On Sun, Jan 31, 2010 at 9:25 PM, Dave Clements <dclements89@gmail.com> wrote:
> After the analyze I am getting the time 3.20 ms but there is not
> HashJoin there. Still all of them are NestLoops. But that is fine.
>
> Now the only problem is the sequence scan on sq_sch_idx table.
> I have a query like this:
>
> explain analyze select count(*) from sq_sch_idx where value = '%download%';
>
> This query does a sequence scan on the table. Is there a way I can
> create an index for this?

If it's not left anchored ( value like 'download%') then not with
regular old methods.  If you need to do text searching you might need
to look into the full text search indexing in pgsql.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Howto have a unique restraint on UPPER (textfield)
Следующее
От: Neil Stlyz
Дата:
Сообщение: combine SQL SELECT statements into one