Re: Bad query performance with more conditions?

Поиск
Список
Период
Сортировка
От kaifeng.zhu
Тема Re: Bad query performance with more conditions?
Дата
Msg-id AANLkTin5wJD8dv6AxgnWfz3h-7C-wXoRhUVWy2RP51NZ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bad query performance with more conditions?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Ответы Re: Bad query performance with more conditions?  (tv@fuzzy.cz)
Список pgsql-general
On Thu, Jun 24, 2010 at 17:14, Alban Hertroys
<dalroi@solfertje.student.utwente.nl> wrote:
>
> You didn't provide explain analyse results for those queries, so I'm just guessing here, but I think you should add
indicesto email_msg_id and email_sender_text to speed up those queries. 
>
> Actually, from your results it would appear that you did create an index on the former, while you probably didn't on
thelatter, causing the second query to have to scan sequentially through all records. 
>
> Alban Hertroys
>

Thanks for your suggestion.
The explain analyzes provided in another mail.
While I did add indices for both email_msg_id and email_sender_text.

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

Предыдущее
От: Dimitri Fontaine
Дата:
Сообщение: Re: copy/duplicate database schemas
Следующее
От: Michelle Konzack
Дата:
Сообщение: HA for PostgreSQL (Auth-Server)