@glilienfield It's strange that the index do not improve but even worsen.
I try the following
case1
CALL apoc.periodic.iterate("MATCH(e:User) MATCH (f:User{sellid:e.buyid}) RETURN e,f",
"CREATE(e)-[r:sell_prodcut_to]->(f)",
{batchSize:10000, parallel: true}) YIELD batch
case 2
CALL apoc.periodic.iterate("MATCH(e:User) MATCH (f:User{sellid:e.buyid}) USING INDEX f:User(sellid) RETURN e,f",
"CREATE(e)-[r:sell_prodcut_to]->(f)",
{batchSize:10000, parallel: true}) YIELD batch
CASE 1 : 10 MIN
CASE 2 : 12 MIN
Why ? (in both case all 0.1 billion node)
B.T.W., case 3
CALL apoc.periodic.iterate("MATCH(e:User) MATCH (f:User{sellid:e.buyid}) USING INDEX e:User(buyid) RETURN e,f",
"CREATE(e)-[r:sell_prodcut_to]->(f)",
{batchSize:10000, parallel: true}) YIELD batch
Fail, show
Failed to invoke procedure `apoc.periodic.iterate`: Caused by: org.neo4j.exceptions.SyntaxException: Cannot use index hint `USING INDEX e:User(buyid)` in this context: Must use label `User`, that the hint is referring to, on the node `e` either in the pattern or in supported predicates in `WHERE` (either directly or as part of a top-level `AND` or `OR`), but no label was found. Predicates must include the label literal `User`. That is, the function `labels()` is not compatible with indexes. Note that label `User` must be specified on a non-optional node