I have a few posts about implementing the sieve of Eratosthenes efficiently:

Optimizing the Sieve of Eratosthenes
One problem using the raw sieving technique is that the sieve asks the question "what are all the primes less than n?", rather than the question you're interested in which is "what is the nth prime?"

You have some options:

1. Estimate roughly how large the nth prime should be:

The number of primes less than n is roughly 1.25506 * n / log(n)

2. Use a segmented sieve of Eratosthenes. This sieves in chunks, and you can keep adding more segments dynamically until you've reached the number of primes you want.

There are a few additional optimizations you can make to the segmented sieve, such as adding wheel factorization, though this really isn't necessary if you just want to just get the 1 millionth prime. My implementation can generate all primes less than 1 billion in ~3.5 seconds (about 57 million primes). Actually, this isn't my fastest implementation nor is it anywhere near the fastest implementation on the web. My fastest implementation is under 3 seconds (don't remember the exact timing), and the current fastest implementation can do it in a fraction of a second.

Segmented Sieve of Eratosthenes with Wheel Factorization
primesieve - current fastest prime number sieve