Is it true that relational database, like MySql, performs better than a graph database, like Neo4j, when a query is about to search for specific data within a specific table and a specific column.
For instance, if the query is: "search for all events that took place in Paris".
Let's assume for simplicity that MySql would have an Event
table with an index upon "City" to optimize this kind of query.
What about Neo4j? One might think that a graph database has to traverse all graphs to retrieve the concerned events... However it's possible to create some indexes with Neo4j as its documentation precises.
Why RDMBS would be faster than it for this kind of analysis/statistics request?
As you already mentioned: you would create indices for this purpose. The default index provider in Neo4j is lucene, which is very fast and allows fine grained indexing and querying possibilities.
Indices can be used for nodes or relationships and (normally) keep track which values have been set on certain properties on nodes or relationships.
You normally have to do the indexing in your application code unless you're using neo4j's auto indexing feature that automatically indexes all nodes and/or relationships with given properties.
So queries like "search for all events that took place in Paris" are absolutely no problem and are very performant when indices are used.