If you get the following error when your users have less privileges than let’s say and admin:
Unable to execute query: Error 0x80070024The attempted operation is prohibited because it exceeds the list view threshold
This is due to the problem that an admin is not affected by list threshold limits while a normal user is bound by these restrictions. Now you could go to Central Admin and change the threshold value from the web application management BUT this is not advisable unless you really know that you are doing. Changing this value may affect the performance of the site in a negative way.
What to do instead is to index the list through a column. In my situation I made a query from an app and needed only the title column data. So I indexed this field. For more info check these links from Microsoft: