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@xxxxxxxxxxxxxx [mailto:pgsql-performance-owner@xxxxxxxxxxxxxx] Im Auftrag von Merlin Moncure Gesendet: Samstag, 23. April 2016 00:11 An: Sven Kerkling Cc: postgres performance list Betreff: Re: Performance problems with postgres and null Values? On Thu, Apr 21, 2016 at 4:49 AM, Sven Kerkling <kerkling@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance