I am just trying to understand the index creation process.
Whenever we create a View and publish it I understand that it does a full bucket scan and this happens regardless of whether the emit is conditional (i.e. only subset of bucket docs) or just all docs in the bucket.
My question is for GSI index that while creating any GSI index even if it is conditional/restricted whether it actually causes all records to be loaded into RAM? (if yes, we may have to create the indexes offline/non-peak hours)
Also (in case of yes) , in a pure “ad hoc/one time” query, if the query itself causes full bucket scan and if creating an index does the same we may decide to run this one time query without thinking about creating an index to suite the where clause.