Re: [GENERAL] Queries joining views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] Queries joining views
Date
Msg-id 18053.1156337432@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Queries joining views  (Alban Hertroys <alban@magproductions.nl>)
List pgsql-hackers
Alban Hertroys <alban@magproductions.nl> writes:
> Mm_object is always larger than any other table in the database, as
> every table joins with (different) records in it to determine it's otype
> and owner. So I don't understand how a fraction of any of those tables
> could be larger than mm_object as a whole...

No, I said a larger fraction, not a larger absolute number of tuples.
The problem is that because mm_product contains only very small values
of "number", a mergejoin looks like a great way to join it to mm_object:
only the first 5% of mm_object will need to be scanned.  The bug
consists in applying that 5% number to mm_insrel, for which it's not
correct.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Tricky bugs in concurrent index build
Next
From: Bernd Helmle
Date:
Subject: Re: [PATCHES] COPY view