I’ve started using RavenDb and I noticed that the RavenDb server creates custom indexes depending on my queries. If I use the same index several times (execute the same query) then the index will be permanently created.
My question is why would I want to create a custom index from ny code if Raven is smart enought to create those indexes for me?
There are a ton of things that Raven can do that can’t be expressed in simple linq queries. For example, Map/Reduce, Multimap, Transformation, custom analysis, and much more.
Also, Joachim’s point is correct – the first user to express a query that requires a new dynamic index will take the hit. Either they will not get back a resonable amount of data, or if you are explicitly waiting for nonstale results, they will be waiting potentially a very long time.
Dynamic queries are great for rapid prototyping, but at some point you should look back on what was actually built and consider creating static indexes for those operations.