Re: anti-join with small table via text/varchar cannot estimate rows correctly

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Stefan Andreatta <s(dot)andreatta(at)synedra(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: anti-join with small table via text/varchar cannot estimate rows correctly
Date: 2017-03-01 22:12:29
Message-ID: CAKFQuwaK=HhqMRL-C8no7YT5ASFJJwe+CVgPrer3V52ih3Z-xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Mar 1, 2017 at 3:00 PM, Stefan Andreatta <s(dot)andreatta(at)synedra(dot)com>
wrote:

> plain analyze
> select tmp_san_1.id
> from tmp_san_1
> left join tmp_san_2 on tmp_san_1.text = tmp_san_2.text
> where tmp_san_2.id is null;
>
> ​Does it help if you check for "tmp_san_2.text is null"?

David J.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Jeff Janes 2017-03-02 00:24:14 Re: anti-join with small table via text/varchar cannot estimate rows correctly
Previous Message Stefan Andreatta 2017-03-01 22:00:06 anti-join with small table via text/varchar cannot estimate rows correctly