On Thu, Dec 10, 2015 at 8:38 PM, ankur_adwyze wrote:
> Hi Folks,
>
> I am a newbie to this mailing list. Tried searching the forum but didn't
> find something similar to the problem I am facing.
>
> Background:
> I have a Rails app with Postgres db. For certain reports, I have to join
> multiple t
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
pos
Note that the inner query is fast (takes only about 0.5 second):
SELECT "fb_ad_groups"."id" FROM "fb_ad_groups" WHERE "fb_ad_groups"."id" IN
(SELECT "fb_ad_groups"."id" FROM "fb_ad_groups" INNER JOIN
"custom_tags_fb_ad_groups" ON "fb_ad_groups"."id" =
"custom_tags_fb_ad_groups"."fb_ad_group_id" IN
Hi Folks,
I am a newbie to this mailing list. Tried searching the forum but didn't
find something similar to the problem I am facing.
Background:
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
wonderin