Re: Bad query performance with more conditions?

From: "kaifeng(dot)zhu" <cafeeee(at)gmail(dot)com>
To: Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bad query performance with more conditions?
Date: 2010-06-24 09:18:06
Message-ID: AANLkTin5wJD8dv6AxgnWfz3h-7C-wXoRhUVWy2RP51NZ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jun 24, 2010 at 17:14, Alban Hertroys
<dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> wrote:
>
> You didn't provide explain analyse results for those queries, so I'm just guessing here, but I think you should add indices to 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 the latter, 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michelle Konzack 2010-06-24 09:27:24 HA for PostgreSQL (Auth-Server)
Previous Message Dimitri Fontaine 2010-06-24 09:16:35 Re: copy/duplicate database schemas