Active Query Builder support area

Possible reasons for delays in loading metadata

Last modified:

Despite the fact that the full load of the Database Schema Tree is not necessary since the second version of the component, and can be completed in a separate thread, loading of the query diagram may take a long time if you have a large database schema. These delays can be diminished in the following ways.

1. Loading of database objects to the Database Schema Tree.

The first reason is the presence of inner namespace types or even objects in the QueryBuilder.DatabaseSchemaTreeOptions.DefaultExpandMetadataType property that leads to the expansion of the listed types of nodes in the Database Schema View during the component's initialization. The less expanded is the tree the faster is the component's initialization. Also please note that turning off all of the QueryBuilder.MetadataStructureOptions.GroupBy* properties will result in a plain list of database objects without any grouping node levels, so all objects would have to be loaded at once.

2. Loading of fields for objects in the query.

Another reason is the loading of fields for a newly added object. If you work with a DB server for which Active Query Builder doesn't have a special syntax provider, especially with a legacy one, it may take a long time to execute a query like "SELECT * FROM <ObjectName>" even if we don't fetch the data after that. This is the only way we can show the list of fields for an object on the diagram for unknown database servers.

3. Loading of auxiliary information for better UI

The last reason for delays might be the loading of objects from all schemas that (a) explicitly mentioned in the query text and (b) from schemas marked as default for the current database user. This happens on parsing a query or on dropping the first object on the diagram. The load is performed to find corresponding objects in the database schema for objects found in the query. This allows for displaying supplementary information about objects, such as field data types and foreign key relationships. This information isn't essential for the component to work but makes the query building process easier.

If the time of adding the first object to the query is unacceptable, you can turn off the loading of this information by setting the QueryBuilder.MetadataLoadingOptions.DisableAutomaticMetadataLoading property to True.

Other possibilities to speed up the loading

If the abovementioned means don't help, please consider decreasing the amount of metadata to load. You can do this by setting up metadata filters or by specifying a subset of metadata necessary for the user to build queries via an XML file.


Is this article helpful for you?