Re: [PERFORM] Performance of complicated query

2013-05-28 Thread Jonathan Morra
nsight would be greatly appreciated. A summary of explain (analyze, buffers) can be found at http://explain.depesz.com/s/qx7f. Thanks On Thu, May 23, 2013 at 5:21 PM, Jonathan Morra wrote: > Sorry for the messy query, I'm very new to writing these complex queries. > I'll try and

Re: [PERFORM] Performance of complicated query

2013-05-23 Thread Jonathan Morra
te: > On 23/05/2013 22:57, Jonathan Morra wrote: > > I'm not sure I understand your proposed solution. There is also the > case to consider where the same patient can be assigned the same device > multiple times. In this case, the value may be reset at each assi

Re: [PERFORM] Performance of complicated query

2013-05-23 Thread Jonathan Morra
n Thu, May 23, 2013 at 1:01 PM, Steve Crawford < scrawf...@pinpointresearch.com> wrote: > On 05/23/2013 10:57 AM, Jonathan Morra wrote: > >> Ultimately I'm going to deploy this to Heroku on a Linux machine (my >> tests have so far indicated that Heroku is MUCH slower than m

Re: [PERFORM] Performance of complicated query

2013-05-23 Thread Jonathan Morra
1. Reads is constantly inserted upon. It should never be updated or deleted. 2. I suppose I can, but that will make my insertion logic very complicated. I cannot guarantee the order of any of this data, so I might get reads at any time and also get assignments at any time (historical as well).

Re: [PERFORM] Performance of complicated query

2013-05-23 Thread Jonathan Morra
out them now. On Thu, May 23, 2013 at 10:47 AM, Steve Crawford < scrawf...@pinpointresearch.com> wrote: > On 05/23/2013 10:19 AM, Jonathan Morra wrote: > >> I am fairly new to squeezing performance out of Postgres, but I hope this >> mailing list can help me. I h

[PERFORM] Performance of complicated query

2013-05-23 Thread Jonathan Morra
I am fairly new to squeezing performance out of Postgres, but I hope this mailing list can help me. I have read the instructions found at http://wiki.postgresql.org/wiki/Slow_Query_Questions and have tried to abide by them the best that I can. I am running "PostgreSQL 9.1.7, compiled by Visual C+