From: | Maciek Sakrejda <msakrejda(at)truviso(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Optimizing NOT IN plans / verify rewrite |
Date: | 2010-08-02 20:35:13 |
Message-ID: | AANLkTi=a2ZprXAio2dNMbbWXMLc9QeKV_QO0qcF9qesX@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2010-08-02 21:03:05 | Re: Optimizing NOT IN plans / verify rewrite |
Previous Message | Andres Freund | 2010-08-02 20:21:51 | Re: Optimizing NOT IN plans / verify rewrite |