Replies: 1 comment
-
It is not. Make sure in testing to look at latency after warm-up. The first few calls will have to open new TCP connection, process SSL handshakes and download metadata (that is cached). Best-case you also provide the PartitionKey on ComsosQueryRequestOptions - that in combination with approach 1) will remove one necessary i/o operation (to retrieve query plan) - if you don't know the partition key this is a cross-partition query that will need to reach out to all partitions - which won't be efficient - but same for 1) and 2) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
sqlQueySpec .setQueryText("select * from c where c.name = @name");
SqlParameter sqlParameter = new SqlParameter();
sqlParameter.setName("@name");
sqlParameter.setValue("Tom");
List params = new ArrayList();
params.add(sqlParameter);
sqlQueySpec .setParameters(params);
cosmosAsyncContainer.queryItems(sqlQueySpec , queryOptions, Object.class);
2.SqlQuerySpec sqlQueySpec = new SqlQuerySpec();
sqlQueySpec .setQueryText("select * from c where c.name = 'Tom'");
cosmosAsyncContainer.queryItems(sqlQueySpec , queryOptions, Object.class);
Beta Was this translation helpful? Give feedback.
All reactions