OK, yes, I hoped that you’d write that.
If you have .gramps backups, which are saved after every session, this is quite easy to realize outside Gramps, although a bit of automation would help to make it even faster. I have a C# program that just loads a .gramps file, runs gzip to extract it when needed, and then loads the XML tree, so that I can use all sorts of fancy queries on it, either by looping through all XML nodes of a particular type, or by using specialized Xpath queries, and these tricks are way fater in C# (with .NET) than in Gramps. And our PC’s are big enough to handle this. I even use this for tweaks, because for me it’s way more transparent then using Isotammi tools.
Anyway, if you accept that you can’t open database files, but need to work on .gramps files, it is quite easy for data scientists too, once you know how to extract the XML. Linux has gunzip for that, and on Windows, 7-Zip is the easiest choice. You may need to rename the file extension to .gz for that, so that 7-Zip knows what to do, and you may also need to rename the extracted file’s extension from .gramps to .xml, so that you can use the associated viewer. That is not always needed on Linux, where many viewers inspect part of the file first, to figure out the best way to open it. And when they can’t, you can always use the file command to figure out the type.
If you try to view the extracted XML with Edge or Firefox, you will often find that they will freeze, because the average tree is much bigger than the average web page. And in those situations, it helps to use a tool like Notepad++ on Windows, or Kate on Linux. Kate was written for the KDE desktop, but she can work on other desktops too, even on Windows:
And since Gramps makes it quite difficult to start more instances, it’s often easier to use another tool to view things, also for markdown.