Extremely slow query when user has Permission Company set

On the same ERPNext site, 2 users one with Company permission set and the other not experiences extreme differences while running reports named Analysis. The one with permission set either gets in a long time or receives timeout. When it is not set for user, the report is rendered as expected.
Anynone?

Hello @Tufan_Kaynak2
How much data is there in the report , if the data set is large then User Permission table will add extra conditions in the Query which might be slowing down the output of the query , are you facing this issue in default or custom report ?