If you need a possibility to search through a large number of issues, we recommend using the Search Security Settings, which allows you to use full JQL capabilities to provide efficient search options. You can set it up in the "Search Security Settings Configuration" tab in the Add-ons panel.
If you want your information to be more secure and hard to search for an unauthorized person, we recommend using Strict Mode of Search Security. To optimize that, when you're using secureSearch() JQL functions in large and heavy loaded instances, you can use secureSearchJQL() or secureSearchFilter() functions as they provide better performance for a limited scope of issues. Please note that Secure Fields cannot be indexed using the Lucene engine as they require a permission check each time.