Questions about BATs and their names in BBP's
So, I'm listing the BATs in a BBP (of a TPCH database), and I'm noticing several strange things: 1. There's a h-u-g-e number of BATs. Actually I knew this to be the case already, since BBPs have so many files, but, it's still striking. 863 BATs for a database with 61 bona fide columns (in lineitem, customer etc.) 2. There are a lot of BATs with null storage. And I do mean a lot - 514 out of 863. What are these? why do they need to exist? And note this is a database in which nothing has occurred except one-time loading. 3. Most BATs have dummy generated names, e.g. tmp_547 - not, say, a concatenation of their table name and column name. Yet - some BATs _do_ have meaningful names: environment_key, sql_dsnapshots, stat_opt_calls and so on. Why not have meaningful names for all BATs then? and lastly, and perhaps most importantly: 5. What's the best/most appropriate/most quick-and-dirty way of obtaining table and column names for those BATs which have them? 6. If it's through the storage table - is there a way to determine which BATs correspond to its columns (table, column, location at the very least)?
While I cannot answer all your question in detail, may the following "one-liner" and its output as well as the hint that MonetDB uses its own genuine data structure, i.e., BATs, for its own internal data management, even before/without that data belonging to any SQL table ... $ rm -r /tmp/dbfarm /tmp/BBP.dir-?-? ; for i in 0 1 2 ; do mserver5 --dbpath=/tmp/dbfarm/MyDB /dev/null ; cp -av /tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir /tmp/BBP.dir-0-$i ; done ; for i in 0 1 2 ; do ( sleep 1 ; mclient -lmal < /dev/null >&2 ) | mserver5 --dbpath=/tmp/dbfarm/MyDB >/dev/null ; cp -av /tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir /tmp/BBP.dir-1-$i ; done ; for i in 0 1 2 ; do ( sleep 1 ; mclient -lsql < /dev/null >&2 ) | mserver5 --dbpath=/tmp/dbfarm/MyDB >/dev/null ; cp -av /tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir /tmp/BBP.dir-2-$i ; done ; wc -l /tmp/BBP.dir-?-?'/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-0-0' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-0-1' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-0-2' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-1-0' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-1-1' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-1-2' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-2-0' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-2-1' '/tmp/dbfarm/MyDB/bat/BACKUP/BBP.dir' -> '/tmp/BBP.dir-2-2' 12 /tmp/BBP.dir-0-0 134 /tmp/BBP.dir-0-1 134 /tmp/BBP.dir-0-2 134 /tmp/BBP.dir-1-0 134 /tmp/BBP.dir-1-1 134 /tmp/BBP.dir-1-2 138 /tmp/BBP.dir-2-0 269 /tmp/BBP.dir-2-1 269 /tmp/BBP.dir-2-2 Best, Stefan ----- On Nov 24, 2016, at 7:17 PM, Eyal Rozenberg E.Rozenberg@cwi.nl wrote:
So, I'm listing the BATs in a BBP (of a TPCH database), and I'm noticing several strange things:
1. There's a h-u-g-e number of BATs. Actually I knew this to be the case already, since BBPs have so many files, but, it's still striking. 863 BATs for a database with 61 bona fide columns (in lineitem, customer etc.) 2. There are a lot of BATs with null storage. And I do mean a lot - 514 out of 863. What are these? why do they need to exist? And note this is a database in which nothing has occurred except one-time loading. 3. Most BATs have dummy generated names, e.g. tmp_547 - not, say, a concatenation of their table name and column name. Yet - some BATs _do_ have meaningful names: environment_key, sql_dsnapshots, stat_opt_calls and so on. Why not have meaningful names for all BATs then?
and lastly, and perhaps most importantly:
5. What's the best/most appropriate/most quick-and-dirty way of obtaining table and column names for those BATs which have them? 6. If it's through the storage table - is there a way to determine which BATs correspond to its columns (table, column, location at the very least)? _______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
-- | Stefan.Manegold@CWI.nl | DB Architectures (DA) | | www.CWI.nl/~manegold/ | Science Park 123 (L321) | | +31 (0)20 592-4212 | 1098 XG Amsterdam (NL) |
participants (2)
-
Eyal Rozenberg
-
Stefan Manegold