First things first, I am a newbie. I never worked with databases before in order to have experience in the matter.
I would like to ask some questions.
I am assuming, you cannot index everything since it uses memory which is not infinite. So I am a bit reserved in creating indexes as I prefer to wait and see where an issue will arise.
These are my questions for now:
- At how many nodes is it good to create an index? For example now that we are at our startup phase we only have 1000 nodes (which we use MATCH on 'uuid' property). I am thinking that I can wait a bit before creating the index, lets say until I reach million nodes.
- Some labels just partition a "larger" label. E.g. I have a label called "Main" which is on 2000 nodes. These 2000 nodes have a secondary label, some of them "SUV" and others "Estate". Should I create a uniqueness constraint 1. on the "Main" label, 2. on the two other labels "SUV" and "Estate" or 3. on both "Main" and "SUV" and "Estate". This is important in order to create my MATCH clauses. Usually I use the "smaller" labels but there are cases where I have to use the "larger" label.
- It is better to wait for something to become slow before creating an index?
- How can you know that you have over-indexed your app?