Re: [PERFORM] Very slow inner join query Unacceptable latency.

From: <fburgess(at)radiantblue(dot)com>
To: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
Cc: "Jaime Casanova" <jaime(at)2ndquadrant(dot)com>, "psql performance list" <pgsql-performance(at)postgresql(dot)org>, "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: [PERFORM] Very slow inner join query Unacceptable latency.
Date: 2013-05-29 14:44:19
Message-ID: 20130529074419.5a830134ae84016b0174832fdc1a3173.028401a187.wbe@email11.secureserver.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>We re-tested&nbsp;these settings a few times after our initial test and&nbsp;realized that the execution time I posted was shewed, because the execution plan was cached after the initial run. Subsequent executions ran in a little over a second.</div>
<div>There&nbsp;ended up being no significant&nbsp;saving by setting these parameters. Un-cached the query ran in about 55 seconds.&nbsp;</div>
<div>&nbsp;</div>
<BLOCKQUOTE style="BORDER-LEFT: blue 2px solid; PADDING-LEFT: 8px; FONT-FAMILY: verdana; COLOR: black; MARGIN-LEFT: 8px; FONT-SIZE: 10pt" id=replyBlockquote webmail="1">
<DIV id=wmQuoteWrapper>-------- Original Message --------<BR>Subject: Re: [GENERAL] [PERFORM] Very slow inner join query Unacceptable<BR>latency.<BR>From: Scott Marlowe &lt;<a href="mailto:scott(dot)marlowe(at)gmail(dot)com">scott(dot)marlowe(at)gmail(dot)com</a>&gt;<BR>Date: Fri, May 24, 2013 3:03 pm<BR>To: <a href="mailto:fburgess(at)radiantblue(dot)com">fburgess(at)radiantblue(dot)com</a><BR>Cc: Jaime Casanova &lt;<a href="mailto:jaime(at)2ndquadrant(dot)com">jaime(at)2ndquadrant(dot)com</a>&gt;, psql performance list<BR>&lt;<a href="mailto:pgsql-performance(at)postgresql(dot)org">pgsql-performance(at)postgresql(dot)org</a>&gt;, Postgres General<BR>&lt;<a href="mailto:pgsql-general(at)postgresql(dot)org">pgsql-general(at)postgresql(dot)org</a>&gt;<BR><BR>On Fri, May 24, 2013 at 3:44 PM, &lt;<a href="mailto:fburgess(at)radiantblue(dot)com">fburgess(at)radiantblue(dot)com</a>&gt; wrote:<BR><BR>&gt; Total runtime: 1606.728 ms 1.6 seconds &lt;- very good response time<BR>&gt; improvement<BR>&gt;<BR>&gt; (7 rows)<BR>&gt;<BR>&gt; Questions:<BR>&gt;<BR>&gt; Any concerns with setting these conf variables you recommended; work_mem,<BR>&gt; random_page_cost dbserver wide (in postgresql,conf)?<BR>&gt;<BR>&gt; Thanks so much!!!<BR><BR>Yes 500MB is pretty high especially if you have a lot of connections.<BR>Try it with it back down to 16MB and see how it does. Work mem is per<BR>sort so a setting as high as 500MB can exhaust memory on the machine<BR>under heavy load.<BR><BR>--<BR>To understand recursion, one must first understand recursion.<BR></DIV></BLOCKQUOTE></span></body></html>

Attachment Content-Type Size
unknown_filename text/html 2.1 KB

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2013-05-29 14:52:11 Re: Foreign Key violated
Previous Message Rodrigo Rosenfeld Rosas 2013-05-29 13:58:09 foreign key to multiple tables depending on another column's value

Browse pgsql-performance by date

  From Date Subject
Next Message Igor Neyman 2013-05-29 16:35:43 Re: Best practice when reindexing in production
Previous Message Matheus de Oliveira 2013-05-29 14:19:02 Re: Best practice when reindexing in production