From: henk de wit <henk53602@hotmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Query with limit goes from few ms to hours
Date: Mon, 15 Oct 2012 19:50:18 +0200
Message-ID: <COL104-W36CB0D0DE2DB88A5D64459F5710@phx.gbl> (raw)
In-Reply-To: <26280.1350231332@sss.pgh.pa.us>
References: <COL104-W53D001BC091CFA02343989F5720@phx.gbl>
<COL104-W143C114F67F241C003CB4F5720@phx.gbl>
<26280.1350231332@sss.pgh.pa.us>
Hi,
> henk de wit <henk53602@hotmail.com> writes:
> > For some reason the mailinglist software seems to block the email as soon as the planner details are in it, so I pasted those on pastebin.com: http://pastebin.com/T5JTwh5T
>
> You need a less horrid estimate for the join size. Possibly an ANALYZE
> on the parent table (stream_store) would help.
Well, what do you know! That did work indeed. Immediately after the ANALYZE on that parent table (taking only a few seconds) a fast plan was created and the query executed in ms again. Silly me, I should have tried that earlier.
Thanks!
Kind regards =
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: henk53602@hotmail.com, tgl@sss.pgh.pa.us
Subject: Re: Query with limit goes from few ms to hours
In-Reply-To: <COL104-W36CB0D0DE2DB88A5D64459F5710@phx.gbl>
References: <COL104-W53D001BC091CFA02343989F5720@phx.gbl> <COL104-W143C114F67F241C003CB4F5720@phx.gbl> <26280.1350231332@sss.pgh.pa.us> <COL104-W36CB0D0DE2DB88A5D64459F5710@phx.gbl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox