diff --git a/src/executor/algo/BFSShortestPathExecutor.cpp b/src/executor/algo/BFSShortestPathExecutor.cpp
index 45975574dcd61bd23be02205517d88482032e243..b0dd9cd6588a31a2f7afa26c83e14068d98f4d27 100644
--- a/src/executor/algo/BFSShortestPathExecutor.cpp
+++ b/src/executor/algo/BFSShortestPathExecutor.cpp
@@ -20,7 +20,7 @@ folly::Future<Status> BFSShortestPathExecutor::execute() {
 
     DataSet ds;
     ds.colNames = node()->colNames();
-    std::multimap<Value, Value> interim;
+    std::unordered_multimap<Value, Value> interim;
 
     for (; iter->valid(); iter->next()) {
         auto edgeVal = iter->getEdge();