Delete duplicate relations

I have one graph with user nodes and follows relations.
there is duplicate relations in graph and I want remove oldest duplicate relations.
I want investigate relations according to csv file similar :

START_ID, END_ID
1 , 2
1 , 3
1 , 4
2 , 1
2 , 5
4 , 3

this csv file has 3,000,000 lines. my cypher take long time. can I write cypher that was faster?
my cypher is:
LOAD CSV WITH HEADERS FROM 'file:///user_followers.csv' as line
match (a:User)-[f:FOLLOWS]->(b:User) where a.id=toInt(line["START_ID"]) and b.id=toInt(line["END_ID"]) with collect(f) as rels
where size(rels) > 1
unwind tail(rels) as t
delete t

also graph has index on node ids.

You can probably get rid of the toInt() in the query so you're not doing function calls within your match query. If you suspect you have nodes using inconsistent data types, correct it first before your duplicate clean up operation. You may want to also consider use apoc.periodic.commit() to commit batches of completed work.

LOAD CSV WITH HEADERS FROM 'file:///user_followers.csv' as line

MATCH (a:User)-[f:FOLLOWS]->(b:User) 
WHERE a.id = line["START_ID"] 
	AND b.id = line["END_ID"] 

WITH collect(f) AS rels
WHERE size(rels) > 1
UNWIND tail(rels) as t
DELETE t

Hi @mohsensoodkhah

there is duplicate relations in graph and I want remove oldest duplicate relations.
I want investigate relations according to csv file similar

could you please explain this with example so we can suggest you better

I find this solution:
I list end ids in relation file and then sort uniq them in follower-end.csv. then run this query:

End_DI
1
2
3
4
5

load csv WITH HEADERS from 'file:///tmp/follower-end.csv' as line with toInt(line["END_ID"]) as e_id
match (s:User)-[f:FOLLOWS]->(e:User) where e.id =e_id with e_id, s.id as s_id, collect(f) as rels where size(rels) > 1 unwind tail(rels) as t delete t