It's better to not use the internal database anyway...it rarely updates properly (usually I have to try twice - first one always fails a low number, and then something like 4,000 or 7,000 or 14,000) and freezes/crashes a lot on play. I mean every 30 minutes. I'm only using a 256Gb card as well - well under 40,000 tracks, something like 16-18,000. I am shuffling the entire database though. Maybe people who play only one or two albums are fine...
Better is to generate a playlist from your folders, or play from folders if you can...that way it rarely crashes. The m0 simply cannot cope with large databases, it don't think it has the processing power.