I am writing a trigger for when a Lead is inserted, I want to query all of our org's Contacts to ensure that the Lead's email does not already exist under a Contact. I am using:
List<Contact> allContacts = [select id, email from Contact];
My fear is that we have 600,000+ Contacts in the org, is this going to cause alot of loading time or slow down user's systems at all? Are there any preferred methods to the query I used above?