Re: [PATCH] Support for foreign keys with arrays

From: Noah Misch <noah(at)leadboat(dot)com>
To: Marco Nenciarini <marco(dot)nenciarini(at)2ndQuadrant(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Support for foreign keys with arrays
Date: 2012-03-20 05:07:52
Message-ID: 20120320050752.GA11554@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 19, 2012 at 06:41:39PM +0100, Marco Nenciarini wrote:
> Attached is v5, which should address all the remaining issues.

Looks clean to me.

> On Fri, Mar 16, 2012 at 11:33:12PM -0400, Noah Misch wrote:
> > If the cost doesn't exceed O(F log P), where F is the size of the FK table and
> > P is the size of the PK table, I'm not worried. If it can be O(F^2), we would
> > have a problem to be documented, if not fixed.
>
> We have rewritten the old query in a simpler way; now its cost is O(F log P).
> Here F must represent the size of the "flattened" table, that is, the total
> number of values that must be checked, which seems a reasonable assumption
> in any case.

Great; I find that approach easier to reason about.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Дмитрий 2012-03-20 08:12:44 Postgres 8.4 planner question - bad plan, good plan for almost same queries.
Previous Message Daniel Farina 2012-03-20 04:33:40 Re: Incorrect assumptions with low LIMITs