From: negora <public@negora.com>
To: pgsql-performance@postgresql.org
Subject: Re: Performance of a nested loop, whose inner loop uses an index scan.
Date: Wed, 19 Oct 2016 19:07:13 +0200
Message-ID: <6a9658d4-e878-2dfb-3dc6-4b358d8f16a2@negora.com> (raw)
In-Reply-To: <CAJghg4Lbs-a-_xTmdTWcuQTiZCpv8hTjv2-kWc2_teyNAWiD8w@mail.gmail.com>
References: <5cb92dc3-af70-3cb1-5b2b-87ccc31f62cb@negora.com>
<CAJghg4Lbs-a-_xTmdTWcuQTiZCpv8hTjv2-kWc2_teyNAWiD8w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Matheus:</p>
<p>Thanks for your prompt answer. It's for a web application. This
part of the application allows to export the answers to a CSV
file. So pagination isn't possible here. The user can choose among
several filters. The group of the courses is one of them. She can
combine as many filters as she wants. So the query that I
presented in my previous message was one of the "broadest"
examples. But it's the one that I'm interested in.<br>
</p>
<p>Really, <b>I'm more interested in the relative time than in the
absolute time.</b> Because I could create the file
asynchronously, in the background, so that the user downloaded it
at a later time. That's not the problem. My doubt is if 2.8
seconds is the best that I can do. Is it an acceptable time?</p>
<p>Thank you! ;)</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 19/10/16 13:15, Matheus de Oliveira
wrote:<br>
</div>
<blockquote
cite="mid:CAJghg4Lbs-a-_xTmdTWcuQTiZCpv8hTjv2-kWc2_teyNAWiD8w@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Oct 19, 2016 at 8:54 AM,
negora <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:public@negora.com" target="_blank">public@negora.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":1ai" class="a3s aXjCH m157dc958f4b446ce">
Nested Loop (cost=245.92..383723.28 rows=7109606
width=38) (actual<br>
time=1.091..2616.553 rows=8906075 loops=1)</div>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra">I wonder about the use-case for this
query, because it returns more than 8M rows, so 2.6 seconds
that sounds that much for so many rows. Is it for an end user
application? Isn't there any kind of pagination?<br>
</div>
<div class="gmail_extra"><br clear="all">
<br>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div>Matheus de Oliveira<br>
<br>
<br>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: public@negora.com
Subject: Re: Performance of a nested loop, whose inner loop uses an index scan.
In-Reply-To: <6a9658d4-e878-2dfb-3dc6-4b358d8f16a2@negora.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox