Zhiyu ZY13 Xu <xuzy13@xxxxxxxxxx> writes: > I experience a PG optimizer problem. Different user query with same SQL at same time. But get different access plan. If you've got row-level security turned on for that table, it could explain results like this. RLS limits the planner's ability to see statistics, which can easily result in a worse plan. regards, tom lane