Re: Advise needed for a join query with a where conditional

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: ankur_adwyze <ankur(at)adwyze(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Advise needed for a join query with a where conditional
Date: 2015-12-11 23:50:24
Message-ID: 566B6140.9040703@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 12/10/15 10:38 PM, ankur_adwyze wrote:
> I have a Rails app with Postgres db. For certain reports, I have to join
> multiple tables. However, certain join queries are dog slow and I am
> wondering if I am missing any index.

My guess is that the planner is coming up with a bad estimate. Please
post the output of EXPLAIN ANALYZE, preferably via
http://explain.depesz.com/
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andreas Kretschmer 2015-12-12 00:20:21 Re: partitioned table set and indexes
Previous Message Jim Nasby 2015-12-11 23:47:36 Re: checkpoints, proper config