After I connected to the database prompt of a leaf node, the SHOW DATABASES output shows many more databases than I expected. What are these databases and what do they include?
Running "SHOW DATABASES" on a leaf node in a SingleStore cluster will show something like the following (note that this is an illustrative example; end-users would generally never log directly into leaf nodes unless instructed to do so by SingleStore Support Engineers):
singlestore> SHOW DATABASES;
The schemas here with underscores followed by a number (my_database_X) are the individual partitions of the database, which are the implementation of the concept of a shard. These databases contain the sharded data in the user database "my_database"; they were all created when a user ran "CREATE DATABASE my_database;" on the cluster's master aggregator.
The schema my_database, without the underscore, is an example of a reference database. This database contains metadata for the sharded tables in my_database and any reference tables that may have been created. Unlike the partition databases distributed across the cluster (so that logging into a different leaf would reveal a different set of numbered partition databases), the reference database is replicated in its entirety on every node in the cluster, similar to the concept of Reference Tables.