[PERFORM] Performance on large, append-only tables

2012-02-10 Thread David Yeu
Hi there, We've got a pretty large table that sees millions of new rows a day, and we're trying our best to optimize queries against it. We're hoping to find some guidance on this list. Thankfully, the types of queries that we perform against this table are pretty constrained. We never update

Re: [PERFORM] Performance on large, append-only tables

2012-02-10 Thread David Yeu
Yeah, Reply-All... Begin forwarded message: From: David Yeu david@skype.net Subject: Re: [PERFORM] Performance on large, append-only tables Date: February 10, 2012 10:59:04 AM EST To: Merlin Moncure mmonc...@gmail.com On Feb 10, 2012, at 10:19 AM, Merlin Moncure wrote: You can

Re: [PERFORM] Performance on large, append-only tables

2012-02-10 Thread David Yeu
On Feb 10, 2012, at 11:26 AM, Claudio Freire wrote: That, and an index on (group_id, created_at) where (deleted_at IS NULL) to catch the sorted by date kind of query, and you'll be done I think. Yeah, I didn't quite get that right -- we're actually sorting all these queries by id DESC, not

Re: [PERFORM] Performance on large, append-only tables

2012-02-10 Thread David Yeu
On Feb 10, 2012, at 11:58 AM, Claudio Freire wrote: From your OP: * Š WHERE group_id = ? ORDER BY created_at DESC LIMIT 20; Yup, sorry. Dave -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: