Get N1QL for spark dataset queries/joins

I’m running into very slow query performance when running in our production environment and I was wondering if there is any way of finding out the generated N1QL queries when using typed DataSets? It can be verbose logging so that the N1QL is in the logs, or whatever else…I just need to see what spark is doing behind the scenes :smiley:

for example - I’m attempting to join with another dataset and it’s timing out (even after increasing the query timeout), so I would like to see what N1QL is actually getting executed in order to see why it’s timing out. We’re migrating from another database, and we can run the join on the same dataset (we are doing dual-write so I can compare the same data) no problem reasonably quickly…so I’m thinking it might be the way I’m querying couchbase, or the index, or … ?

Thanks!

Set completed_threshold 0 as described Identify top N queries in couchbase
and query system:completed_requestes;

https://index-advisor.couchbase.com/indexadvisor/

Cool, I can see if our devops team can help me with that. But no client-side option like logging/etc? (Since the spark connector/java lib is the one issuing the queries after all)