Hi Micheal! Thank you for you reply!
I've already created this index. It's already online.
I'm gonna try to explain my cenario. I'm running a huge ETL process (about 1 billion rows) migrating data from SQL Server to Neo4j. The (:PF) nodes are already loaded, so right now i'm trying to load the relationships beetwen them. This load process is running too slow for my needs. So, in order to improve the load statment, i stopped the process to change some configurations in the server and in the cypher statment as well.
I need to find out what is the last value in the property CPF (label PF) in order to continue the process from that point. I would like to find out this value in a better way, because the query is running too slow. Every time that i stop the ETL process i need to find out the last value and it's taking me a lot of time to do that.
By the way, the ETL statment is:
WITH
"SELECT CPF1, UPPER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(relacao,'ã', 'a'),'ô','o'),'ó','o'),'í','i'),'é','e')) AS REL, CPF2
FROM [BD_BG_SRF_P].[INFOCONTAS].[RELACAO_PF_PF] as RPF WHERE CPF1 >= '08593160689'" as query,
"jdbc:sqlserver://TCEBIDES12:1433;databaseName=BD_BG_SRF_P;user=;password=*" AS url
CALL apoc.periodic.iterate(
'CALL apoc.load.jdbc($url, $query) YIELD row',
'match(p1:PF),(p2:PF)
where p1.CPF=row.CPF1 and p2.CPF=row.CPF2
create (p1)-[:PARENTE_DE {grau: row.REL}]->(p2)
',
{batchSize:10000,iterateList:true,parallel:true,params:{url: url, query: query}}) YIELD batches
RETURN batches
The value '08593160689' would be the last value loaded in Neo4j than i intend to continue from that point.
Would be possible to improve the ETL statment as well?
Thank you!