Memory optimzed indexes and cosistancy


#1

Hi Experts,

I was trying explore memory optimized index in my couchbase cluster 5.1 version . I check the normal global secondary indexes (index consistency section) which has three options while running queries as (not_bounded,at_plus,request_plus) so by this i understand as the normal GSI are stored in the disk so there will be delay in the index writes as compared to the document itself.

However i could not found any dcos materails related to the Memory Optimized GSI as they are stored in RAM only , so do they also have a delay as the normal GSI have ? do i need to provide the options similar to the normal GSI for getting consistent results from the indexes as i need to do with the Normal GSI.

Thankyou.


#2

delay is not due to write to disk. Data is resides on Data Node, which can be any where in the network. Index is updated asynchronously. scan_consistency allows index catch up with data node. So this applicable to memory optimized index also.


#3

Thank-you for your response , correctly said i just mentioned the disk write as we know the GSI only resides on the disk, now as it is clear to me that both the GSI and Memory optimized indexes updates index asynchronously , could please give me example running the select with different consistency parameter from command line of cbq as i could not get anything about it in the documentations, as i would be running those as scripts .


#4
\set -scan_consistency "request_plus";
\set -scan_consistency "not_bounded";

\set -scan_consistency "at_plus";
\set -scan_vector  .......;