Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1djrka-0004UC-3a for pgsql-performance@arkaria.postgresql.org; Mon, 21 Aug 2017 18:48:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1djrkZ-0003fr-Ki for pgsql-performance@arkaria.postgresql.org; Mon, 21 Aug 2017 18:48:35 +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_2) (envelope-from ) id 1djrip-0000a0-1B for pgsql-performance@postgresql.org; Mon, 21 Aug 2017 18:46:47 +0000 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1djril-0005aT-Lf for pgsql-performance@postgresql.org; Mon, 21 Aug 2017 18:46:45 +0000 Received: by mail-oi0-x22e.google.com with SMTP id j144so36013460oib.1 for ; Mon, 21 Aug 2017 11:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=PpQSKA0qW1wL1eewSfjn/UXfYAufA3ewP5uEOkv8SH0=; b=b/uzXYpz+pqeUSqaulP/76uh10JK9RWN1B430shnpo42YG7iQ2lHdOhMhL9kUGz6vl MVynxumHMi23WH5HrN7lME9f0L4dwyM3JUIzVaMOC2+EoZ2gWBwFEhMVsMB3OouDLL+8 OBX6o2JpL8gcbtvi5ltgB/7R65MlAir08+RWwDj5STagx5l6CUtwasP0uUwr/JqC4AwQ r83cEYxgCD/jlC0kOPIXuzIIjQgyIbkc8YGE3Cn2SVA8HtqLfZbnydp3lznPfbGkfk7z xZ1aXLXO16kiykP3gkHubSPJymWDwqNgottd+yk/BuGSRA2PTKUZCXhTvotHb2YK3nAx gwcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=PpQSKA0qW1wL1eewSfjn/UXfYAufA3ewP5uEOkv8SH0=; b=XDmohG3vBxGcP1UBX7yc+5GvTzLXcy7jCIn/Ft9joLubPFa8494qATOOXtWrVcYOET VwBX27b91BfNvnit0a9YPSg6gFG9WAvnp0RIByX1yy8wC7ZLhveXvjwdCYgU5YHbv7bE SGDgFasT5+j6uW3Buwvy0s4XhsiqcziPo/Iqv8LLMD6CnaUBpBkOE28yiZGEwfMPIIrY l2V5bU6dv5nquqsol3AecPajbTbkuI4/7/y0UGgVq6jk7zAOkyA1arvdd1bCs5mSmiGg 4Z9M2B0iY3PZMBtg0aX3OUQAK1KHiXmrXn9UivqVekEI2iqjgxYnKcsM9WBfIiFUiLAL bAzA== X-Gm-Message-State: AHYfb5g8KDeqx5cjOqLK8hNfIc6mqSRLEGlxJo9YKauwbfjkwgtcShqm cYEokeLuwKF533X32bkvnDH4Fk7ADw== X-Received: by 10.202.235.4 with SMTP id j4mr25552429oih.43.1503341202913; Mon, 21 Aug 2017 11:46:42 -0700 (PDT) MIME-Version: 1.0 References: <1503164276875-5979128.post@n3.nabble.com> <20170821183226.GW24376@telsasoft.com> In-Reply-To: <20170821183226.GW24376@telsasoft.com> From: Carlos Augusto Machado Date: Mon, 21 Aug 2017 18:46:32 +0000 Message-ID: Subject: Re: Performance Issue -- "Materialize" To: Justin Pryzby , anand086 Cc: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary="001a113ce5a06042af055747e62c" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --001a113ce5a06042af055747e62c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Do you have an index on login column ? If not, try creating an index and taking off those DISTICTs. Em seg, 21 de ago de 2017 =C3=A0s 15:33, Justin Pryzby escreveu: > On Sat, Aug 19, 2017 at 10:37:56AM -0700, anand086 wrote: > > > +------------------------------------------------------------------------= ---------------------------------------------------------------------------= --------+| > > QUERY PLAN > > > |+-----------------------------------------------------------------------= ---------------------------------------------------------------------------= ---------+| > > Aggregate (cost=3D351405.08..351405.09 rows=3D1 width=3D8) > > Would you send explain ANALYZE and not just explain ? > > Justin > > > -- > Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org= ) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance > --001a113ce5a06042af055747e62c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Do you have an index on login column ?
=
If not, try creating an index and taking off those DISTICTs.=

Em seg, 21 de a= go de 2017 =C3=A0s 15:33, Justin Pryzby <pryzby@telsasoft.com> escreveu:
On Sat, Aug 19, 2017 at 10:37:56AM -0700, anand086 wrote:
> +---------------------------------------------------------------------= ---------------------------------------------------------------------------= -----------+|
> QUERY PLAN
> |+--------------------------------------------------------------------= ---------------------------------------------------------------------------= ------------+|
> Aggregate=C2=A0 (cost=3D351405.08..351405.09 rows=3D1 width=3D8)

Would you send explain ANALYZE and not just explain ?

Justin


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-perform= ance
--001a113ce5a06042af055747e62c--