Ruby, 118118 117 bytes
n=1000000;t=true;a=[t]*n;n=999984;t=true;a=[t]*n;(2..Math.sqrt(n).round).each{|i|a[i]&&(i..n/i).each{|j|a[j*i]=!t}};(2..n).each{|i|a[i]&&p(i)}
Run Time:
0.54s53s user 0.13s system 89%92% cpu 0.752714 total