I have 8 core and 32GBMEM machine and going to run MATCH query as follows, but this query consumes only 1 core and takes long time.
bar = df.to_dict(orient='records') #df is Pandas dataframe and have 1M rows
with n4jses.begin_transaction() as tx:
result = tx.run("""UNWIND {bar} as d
MATCH (a:AD_ID) WHERE a.adid = d.Ad_id RETURN a.adid""",
parameters={'bar': bar})
print(list(result))
That by design that a Cypher query runs on one single CPU. You can either split up work into multiple cypher statements on client side or use some parallel execution procedures from the apoc library, see Neo4j APOC Procedures User Guide.