Re: Actual rows significantly more than estimated during many joins - Mailing list pgsql-general

From Andrew Beverley
Subject Re: Actual rows significantly more than estimated during many joins
Date
Msg-id 20160605003644.923917a8f320584730a413ff@andybev.com
Whole thread Raw
In response to Actual rows significantly more than estimated during many joins  (Andrew Beverley <andy@andybev.com>)
List pgsql-general
On Sat, 4 Jun 2016 Andrew Beverley <andy@andybev.com> wrote:
> I'm performing a query with many joins, with a WHERE condition on the
> "root" table. As far as I am aware, each join is indexed, as is the
> WHERE clause. To my simple mind, this is just a case of taking a set
> of conditional indexed values, and then "adding on" the relevant
> indexed data.

Apologies, I think I've found the problem. All the joined table are
meant to have only a single value for the "root" table, but there were
actually several for some, which was exponentially adding many rows for
all the joins. I've not tried it yet, but I suspect that once I fix
that the performance will be as expected.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pg_trgm] Making similarity(?, ?) < ? use an index
Next
From: Sachin Srivastava
Date:
Subject: How SQL SELECT * statement works in Postgres?