select count(*) where exists (takes 5 hours).
545955Aug 10 2007 — edited Aug 13 2007Hello Gurus,
I have two databases on two servers, I am counting how many rows are similiar on two tables that are identical, and the rows should be identical as well. I am running a select count(*) where exists query and it takes 5 hours to complete.
Each table only has two million rows.
What can I do to speed it up?