What are the correct *default* indices for _Installation

Hi guys!

Can anyone point me to docs or post answer here for this question? What are the correct indices that should be created after fresh database init? Especially relative to deviceToken & installationId fields.
Should I have unique index for installationId?

Thanks!

I think there is no rule of thumb for that but most of my databases have indexes for deviceToken, installationId, and createdAt (because of the dashboard). I’d not create them as unique indexes though.

Hm

Actually I was confused when reading docs here - https://docs.parseplatform.org/rest/guide/

I’ve current mongo instance with unique {installationId, deviceToken}. But this thing made me thinking I can have the unique index for {installationId} only:
installationId : Universally Unique Identifier (UUID) for the device used by Parse. It must be unique across all of an app’s installations. (readonly).

I have a few dup records with same installationId (about 20 within 20M collection). But those looking suspicious as they have exactly the same createdAt.

Regards

It’s strange to have duplicated installation ids but, since it is generated in the client side, technically, it can happen, for example, if the client, for any reason, send the same request to save the installation to the server twice. You can try to add a unique index to avoid such duplications but I’ve never tried it before. I think you should be good though.