Re: query takes 65 times longer if I add 1 column (explain attached)

From: "Dan Weber" <weberdan(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: query takes 65 times longer if I add 1 column (explain attached)
Date: 2006-11-02 20:22:52
Message-ID: 5dfa06e10611021222w22655b4yfca8290f8b5a6a72@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> What have you got work_mem set to?

The default, 1024.

> The fact that the estimates diverge so far from reality can no doubt be
> blamed on the horridly bad rowcount estimates: 3 rows estimated vs
> 179 actual for table_one, and 128592 estimated vs 4202 actual for
> table_two. Have you ANALYZEd these tables lately?

Nope. Doing that caused the first operation to respond very quickly.
(And the second as well, of course.)

Thanks for the assistance.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2006-11-02 20:28:29 Re: Is there anyway to...
Previous Message Richard Troy 2006-11-02 20:00:48 Re: Is there anyway to...