Slow when joining with view - Mailing list pgsql-admin

From Kiswono Prayogo
Subject Slow when joining with view
Date
Msg-id CANiF8TQvHGKkkmrLTX1KRzf8hr5bOvgLGqZhmiKETE5xaXvTEw@mail.gmail.com
Whole thread Raw
Responses Re: Slow when joining with view
List pgsql-admin
The case https://stackoverflow.com/questions/30861967/slow-when-joining-with-view

It doesn't make sense that this query took 10s:

explain analyze
SELECT x1.id    
FROM (    SELECT id, data->>'open_course_id' oc_id   FROM student_credits    WHERE (data->>'student_id')::BIGINT = '5500'
) x1
JOIN (   SELECT id FROM V_OpenCourse_WithTC        WHERE semester_id = '53'
) x2 ON x1.oc_id::BIGINT = x2.id 
when both of its components took less than 100ms:
    SELECT id, data->>'open_course_id' oc_id   FROM student_credits    WHERE (data->>'student_id')::BIGINT = '5500'
    SELECT id FROM V_OpenCourse_WithTC        WHERE semester_id = '53'

--
Best Regards,
Kiswono P
GB

pgsql-admin by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"
Next
From: Ankur Kaushik
Date:
Subject: Re: ERROR: duplicate key value violates unique constraint "geocode_settings_pkey"