Covering index for select *

select * from bucket1 where key1=‘xy’;

Is the below covering index for above query ok:
create index idx1 on bucket1(*) where key1=‘xy’;

Is this normal, I am specifically referring to the asterisk which denotes “all keys”. I dont think it is right. When I EXPLAIN, it does not use this index.

Thanks

Covering index only for specific fields not for whole document.

SELECT *

will not be covered it must do Fetch,

Thanks.

A few seconds back came across Adaptive indexes (havent looked deep into it yet; not sure if it is new in 6.5 or 6.6), but can it help?

Also, any workaround?

Adaptive index will not cover.

If really need whole document there is no way avoid fetch.
select RAW META().id from bucket1 where key1=‘xy’;
create index idx1 on bucket1( key1) where key1=‘xy’;

Then use SDKs fetch the document in parallel asynchronously.

MB-35082