Specifying custom default graph as merge of "named graphs following certain pattern" in sparql query

Hello. Thanks for virtuoso.
Presently we can specify custom dataset for a sparql query with FROM and FROM NAMED declarations. Thus we can specify a custom dataset, whose default-graph is merge of graphs declared with FROM, and whose named graphs are individual named graphs declared with FROM NAMED.

This pattern works fine until we have to search among merge of small number of named graphs, by enumerating all of them with FROM. But if we have to search across merge of millions of small named graphs , whose description matches certain criteria (like, trusted-by-an-authority, extracted-from-specific-resources), then it won’t scale.

Is there any way for us to define such custom-view/ synthetic-graph easily?

Thanks again.

Here is blazegraph’s implementation of Virtual Graphs for example.
It allow us to persist virtual graph membership by explicit declaration. And then allow us to refer to virtual-merged-graph by it’s IRI from FROM VIRTUAL declaration.

In Virtuoso Graph Groups are supported enabling a collection of Named Graphs to be assigned to a Graph Group that’s then used as the focal point of SPARQL Queries via FROM or FROM NAMED clauses.

Thanks for pointer.
And it has clauses like, A dictionary of all groups and their members is cached in memory for fast access......, and Graph groups are "macro-expanded" only in.....

Does that mean sparql query will be rewritten with all those iris and then executed?

Does the feature scale up to say millions of small named graphs as components of resultant graph group?