In search of performance improvements, the AWS Neptune experts suggested that I create some indexes. To better contextualize, I have 3 operations in a single POST endpoint with the database. A query of previous data bringing the relationships of a specific ID, a deletion of edges if there is a registration in the database and a registration/update of vertices and edges. Today I am trying to attack two problems. Improve the performance of the creation that takes approximately 150ms and improve the performance of the query that is currently bogging down between 1.2-17 seconds.
Is it possible to create an index for vertexes and edges by specifying them by label since I have vertices and edges with different labels that have different properties? Does anyone know what this implementation would look like?
In my current implementation I do it in a simple way as follows:
client_write = client.Client(neptune_url, "g", message_serializer=serializer.GraphSONMessageSerializer())
queries = [
"graph.createIndex('journey_id', Vertex.class)",
"graph.createIndex('person_type', Vertex.class)",
"graph.createIndex('relationship_type', Edge.class)"
]
for query in queries:
client_write.submit(query).all().result()