Re: Bad query performance with more conditions? - Mailing list pgsql-general

From kaifeng.zhu
Subject Re: Bad query performance with more conditions?
Date
Msg-id AANLkTin5wJD8dv6AxgnWfz3h-7C-wXoRhUVWy2RP51NZ@mail.gmail.com
Whole thread Raw
In response to Re: Bad query performance with more conditions?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Responses Re: Bad query performance with more conditions?
List 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 by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: copy/duplicate database schemas
Next
From: Michelle Konzack
Date:
Subject: HA for PostgreSQL (Auth-Server)