To get around these size limitations, you can use a sitemap index (e.g.
http://flight-plan-database.tk/sitemap-index.xml ) files, which is essentially a sitemap of sitemaps. Each sitemap index can hold up to 50,000 sitemap urls (or 10MB), of which each sitemap can hold 50,000 page urls, so in total you could in theory submit 2,500,000,000 urls using 1 level of sitemap index. If you wanted to try to submit more than that, you'd need more than one sitemap index.
Additionally, Google will not necessarily index every file in the sitemap (e.g. Google indexes about 10% of my pages).
Also, Google will be looking at your sitemap quite often which might be a bit of a drag on your site if the generation is slow; instead you could cache it and regenerate once a day with a cron job of that script.