Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6b7J-0008JI-TK for pgsql-sql@arkaria.postgresql.org; Fri, 05 May 2017 11:09:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d6b7J-00015J-Fr for pgsql-sql@arkaria.postgresql.org; Fri, 05 May 2017 11:09:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d6b7I-00011x-Bn for pgsql-sql@postgresql.org; Fri, 05 May 2017 11:09:44 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d6b7E-0001p1-Q7 for pgsql-sql@postgresql.org; Fri, 05 May 2017 11:09:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To:Message-ID:Subject:Cc:To:Sender:From:Date; bh=8Lf0spjMllsp07N416t1iEhRvGVNFhb962iUkZDtzfQ=; b=Bz1kdFJESPyfEt2/KqY3JqOg/r7yDJIfEE3hpJUmfhvF9jx4Tins8t1fSJ5mHheW7QZOiG7ZQDwiEhbcmbRnqTIotYL9/Xt47MRNqBxkFy4NxzeKrRgeun62uMsVD65xo5f+v6Xyy4OsnV0rJWn1W3uXEGQwOrNuMoaJEuTEBXM=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpa (Exim 4.84_2) (envelope-from ) id 1d6b7D-0006V6-Rq; Fri, 05 May 2017 13:09:39 +0200 Date: Fri, 5 May 2017 13:09:39 +0200 From: hubert depesz lubaczewski To: Gary Stainburn Cc: pgsql-sql@postgresql.org Subject: Re: Most recent row Message-ID: <20170505110939.GB20445@depesz.com> Reply-To: depesz@depesz.com References: <201705050925.04194.gary.stainburn@ringways.co.uk> <201705051044.54259.gary.stainburn@ringways.co.uk> <20170505100037.GA23734@depesz.com> <201705051154.54863.gary.stainburn@ringways.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201705051154.54863.gary.stainburn@ringways.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org On Fri, May 05, 2017 at 11:54:54AM +0100, Gary Stainburn wrote: > On Friday 05 May 2017 11:00:37 hubert depesz lubaczewski wrote: > > On Fri, May 05, 2017 at 10:44:54AM +0100, Gary Stainburn wrote: > > > > How many rows are in people? How many in assessments? Do you really > > > > want data on all people? Or just some? > > > > > > I was looking for a balanced solution, combining performance and SQL > > > 'purity'. > > > > Solution depends on answers to questions I asked. Will you always get > > data for all people? Or just some? How many assessments per person will > > there usually be? > > > > Best regards, > > > > depesz > > Oddly, part of my reply was missing. > > As I said, there are currently 720 rows in the people table. > The will be a new assessment record for each person roughly every six months. > The dataset will be open ended so will slowly but indefinitely grow. > > The part that was missing was that there will be new people records added who > initially will not have an assessment. They will still need to be included in > the report. There was this part, but it still doesn't contain information about: - how many assessments per person will there usually be? - will you always get data for all people? - if not (all people) - how many (percent or count)? Best regards, depesz -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql