Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aUtQ6-0002ii-Iz for pgsql-general@arkaria.postgresql.org; Sun, 14 Feb 2016 09:56:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aUtQ5-0006j7-Id for pgsql-general@arkaria.postgresql.org; Sun, 14 Feb 2016 09:56:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aUtQ4-0006iQ-5z for pgsql-general@postgresql.org; Sun, 14 Feb 2016 09:56:44 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aUtQ0-0002SS-Sh for pgsql-general@postgresql.org; Sun, 14 Feb 2016 09:56:42 +0000 Received: by mail-wm0-x232.google.com with SMTP id a4so20165154wme.1 for ; Sun, 14 Feb 2016 01:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mX8fTT70yWVL8HoD0X2Yh9KQcyEiW+JLSeayWTnuWBE=; b=Ea8WZDvINzHlH4k5ikUqhEHo0hzcoEmniYg5B7EzQu/fTpiDfOU5//p0kbkVZrbD4F iZQy2wdaG0Ai8gPlRJeYA5I/v4FC3rjS2yFRpcgyPbzL8C2kvxI6v6a5s5oLdaA5NiI+ o5IIyzQpsiDHOIKudYPVlpVoNUhxzpiszrkioebu+Dr3GbdpeIu7HstHjqYS0soDvcF3 FdnmwRm3lR7tdaibmMAWoxi+hwmebdr8fS9fILA88oWUD0YJSqRh6ahG1rY7l4aaH0tA gSVQVc5SOB9A3UTHHtFtqvMHV2yTn7KKo4bDUKy+5qJZ8kNoIWDYl3F1LotKdq/+lXhp dEnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=mX8fTT70yWVL8HoD0X2Yh9KQcyEiW+JLSeayWTnuWBE=; b=kENPLH/O2Qi7fp/+HPqs96DOJvOSnoArikHMW1dZ8y9rtrmbFW3YQAV77HzRoJVqWD 1AYRO/cfg5ENrbR7PCqJ/n/5ZjzuAOM3GEfEeQdRJWsJ7d3bMb+catSJmz+lSN1kIn4X A3il0MAXi0ECEdxkXtAx9tEp9p4Uga1Xq48/UJx+6+JSfWv8aDh9ronrqp//UQDEyqfe p8yFQs335Yx3nRHWgrgoQzzIWli47b0UN+ostUMTNmEcP06eYPRHQN0ILMBAwhySJYY4 Cy/HF9ot7Cr2TNADuYtuSw8my/L+Tu5LWWphwdu5eU24YWnOqQE4jcociqxRBW6qdRQx dkug== X-Gm-Message-State: AG10YOQFILri72SyuOmsde2pKNuHPiFOrIg++JjDZK4NexfXqxpnr7CdSpihL2oFfhL83Q== X-Received: by 10.194.90.229 with SMTP id bz5mr11589657wjb.143.1455443798506; Sun, 14 Feb 2016 01:56:38 -0800 (PST) Received: from hollewijn.internal (8d690a59.ftth.concepts.nl. [141.105.10.89]) by smtp.gmail.com with ESMTPSA id t3sm20024864wjz.11.2016.02.14.01.56.37 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Feb 2016 01:56:37 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Optimize Query From: Alban Hertroys In-Reply-To: Date: Sun, 14 Feb 2016 10:56:36 +0100 Cc: Postgres General Content-Transfer-Encoding: quoted-printable Message-Id: References: To: drum.lucas@gmail.com X-Mailer: Apple Mail (2.3112) X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org > On 13 Feb 2016, at 11:21, drum.lucas@gmail.com wrote: >=20 > Anyone can help with that please? >=20 > Cheers What would help is: 1. to post an actual query that you need optimised and 2. an explain analyze of that query. What you posted in your original message was some kind of query-template wi= th enough placeholders and views that there is no way to predict how that's= going to perform without at least knowing what goes into the placeholders = and how the views are built up. Alban Hertroys -- If you can't see the forest for the trees, cut the trees and you'll find there is no forest. --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general