Re: explain analyze output: 0 rows, 1M loopa

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: explain analyze output: 0 rows, 1M loopa
Date: 2017-11-01 19:48:03
Message-ID: CAOR=d=03KhEXsO8DFFP105eKha4M4_vd+igfghZ3fOn_mUc2Lg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Nov 1, 2017 at 1:19 PM, David G. Johnston
<david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Wed, Nov 1, 2017 at 11:59 AM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
> wrote:
>>
>> So some of my output from an explain analyze here has a line that says
>> this:
>>
>> ex Scan using warranty_order_item_warranty_order_id_idx on
>> warranty_order_item woi_1 (cost=0.57..277.53 rows=6 width=137) (actual
>> time=0.110..0.111 rows=0 loops=1,010,844)
>
>
> Not my strong suit but, I'm pretty sure that reads: "The index was queried
> 1M+ times and none of those inqueries resulted in a record being found".
> IIUC I'd be wondering why some form of hash join wasn't used...

Thanks I think you've got it. I wish it would fit in a hash but the
dataset this query works on is so big that it spills to disk with
work_mem=16GB... :(

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adam Brusselback 2017-11-01 20:11:07 Possible bug: could not open relation with OID [numbers] SQL State: XX000
Previous Message David G. Johnston 2017-11-01 19:31:00 Re: explain analyze output: 0 rows, 1M loops