Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E4B03632731 for ; Fri, 11 Jun 2010 15:54:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 87069-07 for ; Fri, 11 Jun 2010 18:53:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 9AAFC6326E4 for ; Fri, 11 Jun 2010 15:53:55 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1ON9MV-0003wo-Ur for pgsql-performance@postgresql.org; Fri, 11 Jun 2010 20:53:51 +0200 Received: from d226042.adsl.hansenet.de ([80.171.226.42]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jun 2010 20:53:51 +0200 Received: from tim by d226042.adsl.hansenet.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 11 Jun 2010 20:53:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: pgsql-performance@postgresql.org To: pgsql-performance@postgresql.org connect(): No such file or directory From: Tim Landscheidt Subject: Re: Analysis Function Date: Fri, 11 Jun 2010 18:53:44 +0000 Organization: Lines: 19 Message-ID: References: <4C119B3E.3090608@squeakycode.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: d226042.adsl.hansenet.de Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:YaLZZwReMdNtMUMDcr0m5JgiMYY= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-10 required=5 tests=BAYES_20=-0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/217 X-Sequence-Number: 39073 David Jarvis wrote: > [...] >> invest too much time to have the user wait not 4.4, but >> 2.2 seconds. You could also do the concatenation in the ap- >> plication if that is faster than PostgreSQL's date arithme- >> tics. > No, I cannot. The concatenation uses the year that the measurement was > made--from the database--and the month/day combination from the user. See > also: > http://stackoverflow.com/questions/2947105/calculate-year-for-end-date-postgresql That page doesn't deal with "select year from database and month/day from user and present the results", but *much* different problems. Tim