Complex query performance optimization

@vsr1 What would you say about Bucket “resident percent” (currently I have 68.1%). Would it improve performance of my N1QL queries if I brought it up to 100%? Also interested in the dependency of this percentage on performance (for example if I increase it by 20% will performance increase by 20% or more)?

First you need to look where bottle neck. One way is profile
Best will be execute query in Query Work Bench after finished goto Plan Text Tab. paste the content here.