Debugging a parameterized query

Hello guys,
I am currently debugging an issue where running a query as a parameterized query and running the same query in the UI with same parameters give different results and execution times (one executes in millis and the other in 10+seconds)
We have taken the whole query as executed in the UI and ran it as a simple query from the SDK and we see it executes in millis as well.
This leads us to believe that there is something wrong in how we are populating that parameter map for the parameterized query.

The concrete question we have is, what class from the CB SDK could I go look and set up a breakpoint to peek into whats the effective query and values that will be used by the SDK to query the cluster? We are using SDK version 2.7.15

Will you able to share your query and index definition.
NOTE: If the Index has WHERE clause, corresponding part of the query must be static (no parameterized) to use prepare statements. Other option is set adhoc=true

plan is generate prepare time and if index where clause parameterized that index doesn’t have all the info and execution time if you give different value it can’t be serviced.