Re: Query with limit goes from few ms to hours - Mailing list pgsql-performance

From henk de wit
Subject Re: Query with limit goes from few ms to hours
Date
Msg-id COL104-W36CB0D0DE2DB88A5D64459F5710@phx.gbl
Whole thread Raw
In response to Re: Query with limit goes from few ms to hours  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: Andrea Suisani
Date:
Subject: Re: Two identical systems, radically different performance
Next
From: houmanb
Date:
Subject: SELECT AND AGG huge tables