Re: Performance Issue (Not using Index when joining two tables). - Mailing list pgsql-performance

From Michael Lewis
Subject Re: Performance Issue (Not using Index when joining two tables).
Date
Msg-id CAHOFxGqVg9S3dZS4GHzqefc36FschzDVLsOG_jRgm4MwjfDxVw@mail.gmail.com
Whole thread Raw
In response to Re: Performance Issue (Not using Index when joining two tables).  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Performance Issue (Not using Index when joining two tables).
List pgsql-performance
Filter: ((("current_user"())::text <> ANY ('{wfnadmin,skipvpd}'::text[])) AND f_sel_policy_all(vpd_key, 'CH
R_EMP_POSITION'::character varying) AND f_sel_policy_prod_locale((cep.*)::character varying, prod_locale_code))

This looks like some stuff for row level security perhaps. My understanding is limited, but perhaps those restrictions are influencing the planners access or reliance on stats.

Also, it would seem like you need the entire table since you don't have an explicit where clause. Why would scanning an index and then also visiting every row in the table be faster than just going directly to the table?

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance Issue (Not using Index when joining two tables).
Next
From: "Gopisetty, Ramesh"
Date:
Subject: Re: Performance Issue (Not using Index when joining two tables).