Re: Optimizing NOT IN plans / verify rewrite - Mailing list pgsql-performance

From Maciek Sakrejda
Subject Re: Optimizing NOT IN plans / verify rewrite
Date
Msg-id AANLkTi=a2ZprXAio2dNMbbWXMLc9QeKV_QO0qcF9qesX@mail.gmail.com
Whole thread Raw
In response to Re: Optimizing NOT IN plans / verify rewrite  (Andres Freund <andres@anarazel.de>)
Responses Re: Optimizing NOT IN plans / verify rewrite
List pgsql-performance
>> All fields involved are declared NOT NULL, but thanks for the heads up.
>Afair the planner doesnt use that atm.

I was referring to not having to care about the strange NULL semantics
(as per your original comment), since I have no NULLs. Given that, I
think the NOT EXISTS could be a good solution, even on 8.3 (we're
planning to upgrade, but it's not a feasible solution to this
particular problem), no?

Basically, it seems like the main issue with the current plans is the
per-tuple seq scans on the full materializations. Adding correlation
(by rewriting NOT IN as NOT EXISTS) prevents materialization, hence
getting rid of the biggest performance problem.

Thanks,
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

pgsql-performance by date:

Previous
From: Andres Freund
Date:
Subject: Re: Optimizing NOT IN plans / verify rewrite
Next
From: "Kevin Grittner"
Date:
Subject: Re: Optimizing NOT IN plans / verify rewrite