Re: Performance problems with postgres and null Values?

From: "Sven Kerkling" <kerkling(at)bds-online(dot)com>
To: "'Merlin Moncure'" <mmoncure(at)gmail(dot)com>
Cc: "'postgres performance list'" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance problems with postgres and null Values?
Date: 2016-04-25 07:22:54
Message-ID: 009a01d19ec3$4ba83060$e2f89120$@bds-online.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)postgresql(dot)org [mailto:pgsql-performance-owner(at)postgresql(dot)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(at)bds-online(dot)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(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Albe Laurenz 2016-04-25 08:08:22 Re: Performance problems with postgres and null Values?
Previous Message bricklen 2016-04-24 20:14:25 Re: Performant queries on table with many boolean columns