SQLite also gets really slow at around 50 million rows.

Seems fine at billions oe rows in my experience.

what are your pragmas?