Out of that, there were several TOP 10 million new tables created - for optimization.
You've actually hit on one of the things SQLite gives up in order to stay small and light-it plays fast and loose with types.