But it doesn’t seem that row returns anything my result is always 0? I have even put print statements. If I remove the index on fullName then I usually get back a result, but not always. And if I add GSI to fullName I don’t get a result.
can you try leaving off the adhoc part or setting it to true? Prepared statements (which is what we’ll do under the covers) had some bugs in RC0 as far as I remember.
Yeah so adhoc true seems to work and row returns, but now queries seem to timeout with just a few 100 client requests/N1QL queries and are slower alot slower.
So bassicaly I have 100 Jmeter threads/users sending to 3 load balanced vertx.io nodes which use the java SDK to connect to couch base.
With adhoc true I can generate about 400 operations per second write + 1 N1QL query and each request takes 200 milliseconds. With adHoc = false I can do about 2000 ops per second at 55ms per roundtrip.
@javadevmtl right, so prepared statements are faster, you want to wait for the final release to make it work again.
Also what you can try to get more throughput is increase the queryEndpoints on the environment, by default it’s one. Try to set it to 3 or 5 and see if it gets better.
I have java-client-2.2.0 and server 4.0.0-4051 Enterprise Edition (build-4051). Prepare query is still not working, i.e. with the same statement, setting adhoc to false returns empty result while setting adhoc to true returns results as expected.
unfortunately there are still some issues with prepared statements in the 4.0 server release . You should defer heavy testing of adhoc(false) to the next server release (cc. @geraldss)