In neo4j you can create index for both property and nodes. Indexing is data structure that helps faster performance on retrieval operation on database. There is special features in neo4j indexing once you create indexing that index will manage itself and keep it up to date whenever changes made on the database. Similarly CREATE INDEX ON statement will provide the indexing.
Example: In the below example we create index on the Tag property of all nodes with the GeeksforGeeks label.
$ CREATE INDEX ON:GeeksforGeeks(Tag)
Output:

Note:
When you create an index, neo4j will create the index in background. If your database is large it will take some time.
View Index:
Index and Constraint is the part of the database schema. To view the indexes you have to use :schema command, like below example.
:schema
Output:
Index hints:
If the indexing is exist on your database then it will be helpful when you triger similar type of queries, it improves the performance. You can create an index hint by including USING INDEX … in your query.
$ MATCH (a:GeeksforGeeks {Tag: "A Computer Science Portal"})
USING INDEX a:GeeksforGeeks(Tag)
RETURN a
Output:

Note: You can also provide multiple hints. Simply add a new USING INDEX for each index you’d like to enforce.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Recommended Posts:
- Neo4j Drop Index
- Neo4j Create Node
- Neo4j Create Relationship
- Neo4j Create Constraint
- Neo4j Introduction
- Neo4j Installation
- Neo4j Delete Node
- Neo4j Query Cypher Language
- Neo4j | Naming rules and recommendations
- Neo4j | Values and Types
- Difference between Teradata and Neo4j
- Difference between Neo4j and IBM DB2
- Difference between Neo4j and CouchDB
- Difference between Neo4j and MariaDB
- Difference between Neo4j and Redis
- Difference between Neo4j and Couchbase
- Difference between Neo4j and Cassandra
- Difference between Neo4j and MySQL
- Difference between Neo4j and MS SQL Server
- Difference between Neo4j and PostgreSQL
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : skyridetim

