My blog has over 700,000 articles…
You need to look at your webhost and server. WordPress is perfectly scalable, but you need the hardware to back it up. That’s a database intensive query, and you need the MySQL server to handle it.
Run mysqltuner.pl https://github.com/major/MySQLTuner-perl to check your MySQL configurations and adjust cache and memory settings in my.cnf.