Re: [PERFORM] Changing ORDER BY column slows query dramatically

2013-04-12 Thread brick pglists
Hi Shaun, On Fri, Apr 12, 2013 at 12:59 PM, Shaun Thomas wrote: > On 04/12/2013 11:51 AM, brick pglists wrote: > > Since it doesn't show up in your GUC list, you should probably increase your > default_statistics_target to 400 or more, analyze, and try again. The > heuristics for the dates aren't

Re: [PERFORM] Changing ORDER BY column slows query dramatically

2013-04-12 Thread Shaun Thomas
On 04/12/2013 11:51 AM, brick pglists wrote: -> Index Scan Backward using event_20130405_id_pk on event_20130405 e (cost=0.00..612732.34 rows=1889715 width=34) (actual time=2076.812..2111.274 rows=10100 loops=1) > Filter: ((tstamp_utc >= '2013-04-05 > 10:00:00'::time

[PERFORM] Changing ORDER BY column slows query dramatically

2013-04-12 Thread brick pglists
Hi, (I have put the contents of this email at http://pastebin.com/6h49zrYE for better readibility) I have been circling around the following problem for a few hours and I am wondering if anyone has any suggestions about why the the second query is taking so much longer than the first. Both tables