USE INDEX vs finding the index

Hi,

I have a couchbase enviromnent with 2 nodes where there are about 200 indexes where the indexes are replicated across the 2 nodes with different names, for example, lookup_index_1 and lookup_index_2

If I have a query

select * from write use index(lookup_index_1, lookup_index_2) where docType = ‘group’

and the query without the index

select * from write where docType = ‘group’

Is it better to use the query with the index hints?

Is the speed of execution negligible between the queries?

Regards,
Damian.

If you have too many indexes without hint it takes time to decide right index. You can use prepare statement to reduce the time
With USE INDEX if index name changes you need to change query.

You should consider replicated index in 5.0, Based on your SLA you can decide which option to use