Re: Performance of a nested loop, whose inner loop uses an index scan.

From: negora <public(at)negora(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance of a nested loop, whose inner loop uses an index scan.
Date: 2016-10-19 17:07:13
Message-ID: 6a9658d4-e878-2dfb-3dc6-4b358d8f16a2@negora.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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(at)mail(dot)gmail(dot)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">&lt;<a moz-do-not-send="true"
href="mailto:public(at)negora(dot)com" target="_blank">public(at)negora(dot)com</a>&gt;</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>

Attachment Content-Type Size
unknown_filename text/html 2.6 KB

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Lars Aksel Opsahl 2016-10-24 08:11:48 Fast insert, but slow join and updates for table with 4 billion rows
Previous Message Matheus de Oliveira 2016-10-19 11:15:59 Re: Performance of a nested loop, whose inner loop uses an index scan.