Re: Performance problems with postgres and null Values? - Mailing list pgsql-performance

From Sven Kerkling
Subject Re: Performance problems with postgres and null Values?
Date
Msg-id 009a01d19ec3$4ba83060$e2f89120$@bds-online.com
Whole thread Raw
In response to Re: Performance problems with postgres and null Values?  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Performance problems with postgres and null Values?
List pgsql-performance
This one is quick, running in 20ms:

    SELECT b.id, b.status
    FROM export b, masterOld mb
    WHERE mb.sperre IS NULL
      AND mb.status IS NULL
      AND b.id_firma = mb.id_firma
    LIMIT 100;

http://explain.depesz.com/s/SCBo

This one ist the burden, running at least 100 seconds:

    SELECT b.id, b.status
    FROM export b, masterNew mb
    WHERE mb.sperre IS NULL
      AND mb.status IS NULL
      AND b.id = mb.id
    LIMIT 100;

http://explain.depesz.com/s/eAqG

There should be only slight differences between them.

Sven

-----Ursprüngliche Nachricht-----
Von: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org] Im Auftrag von Merlin
Moncure
Gesendet: Samstag, 23. April 2016 00:11
An: Sven Kerkling
Cc: postgres performance list
Betreff: Re: [PERFORM] Performance problems with postgres and null Values?

On Thu, Apr 21, 2016 at 4:49 AM, Sven Kerkling <kerkling@bds-online.com> wrote:
> Can somebody help me with these performance Problem.
>
> What can I try to solve this?

can you explain what the problem actually is?  Which query is running slow and how fast do you think it should run?

merlin


--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



pgsql-performance by date:

Previous
From: bricklen
Date:
Subject: Re: Performant queries on table with many boolean columns
Next
From: Albe Laurenz
Date:
Subject: Re: Performance problems with postgres and null Values?