Best way to store 1 billion+ posts?

I don’t know about how long it will take to create that many tables, especially if you do it in one go, but you can use $wpdb to handle the creation. There’s an article on the Codex regarding creating custom tables, https://codex.wordpress.org/Creating_Tables_with_Plugins

And it crossed my mind that perhaps using some external tool to handle the database querying could potentially make the queries run faster. Elasticsearch (I’m not an affiliate), in tandem with ElasticPress, is the only one I’ve heard of, but I’m sure there’s plenty of similar tools. Maybe that could be worth checking out?