function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
samrat.1985@lntinfotechsamrat.1985@lntinfotech 

How to calculate SOSL queries executed in a page

I want to calculate number of SOSL queries executed in  Visual Force page. Any suggestions how to do this?

ShaTShaT
Bhawani SharmaBhawani Sharma
Use Limits.getSoslQueries() method.
sfdcfoxsfdcfox
1) Open the Developer Console. Make sure the that logging options include query usage (Debug > Set Debug Levels > Profiling [Finest]).
2) Perform your search on the Visualforce page.
3) Open the log file, and scroll to the bottom. You'll see the total query time, number of queries, rows returned, etc.