Re: [PERFORM] Please help with a slow query: there are millions of records, what can we do?

2017-03-22 Thread Pat Maddox
> On Mar 8, 2017, at 11:00 AM, Jeff Janes wrote: > > You could try a partial index on: > > (account_id, completed_at desc, taskable_name, position, assigned_to_user_id) > where "tasks"."archived" != 't' AND "tasks"."complete" = 't' > > Also, the poor estimate of the number of rows on your sca

[PERFORM] Please help with a slow query: there are millions of records, what can we do?

2017-03-07 Thread Pat Maddox
Hi there, I’ve been asked to help with a project dealing with slow queries. I’m brand new to the project, so I have very little context. I’ve gathered as much information as I can. I’ve put the schema, query, and explain info in gists to maintain their formatting. We are stumped with this slo

[PERFORM] Trying to tune postgres, how is this config?

2007-07-19 Thread Pat Maddox
I'd like any advice you have on my postgres.conf. The machine in question is a 2.4 Ghz Xeon with 2 gigs of ram running freebsd 6.2 and postgres 8.24. There are 16 concurrent users. This machine is used only for the database. Usage is split out pretty evenly between reads and writes. Thanks, P