Re: join on three tables is slow

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Gerry Reno" <greno(at)verizon(dot)net>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: join on three tables is slow
Date: 2007-12-11 06:00:12
Message-ID: 162867790712102200m2144573bw7447e0eff6720d55@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 11/12/2007, Gerry Reno <greno(at)verizon(dot)net> wrote:
> Ok, I've been playing around with this SQL some more and I found that if
> I remove this:
> e.active = '1'
> from the query that the query now completes in 5 seconds. Nothing else
> has anywhere near the impact of this boolean condition. So what is it
> about this boolean field that is causing so much delay?
>

send execution plan and we can see. Maybe you need a cast on every
row, because '1' is varchar. Try e.active = true

Pavel

> Gerry
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Gerry Reno 2007-12-11 13:23:54 Re: join on three tables is slow
Previous Message Richard Broersma Jr 2007-12-11 04:50:02 Re: Insert Rule, Multiple Insert, Update Problem