Skip to content

Join with virtual table (JoinWithVirtualTable)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL Major Yes 10 sql
standard
performance

Description

When writing queries, you should not use virtual tables joins. Only metadata objects or temporary tables should be joined to each other.

If the query uses a join to a virtual table (for example, AccumulationRegister.Products.Balance) and the query is slow, then it is recommended to move the data reading from the virtual table into a separate query with the results saved in a temporary table.

Examples

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:JoinWithVirtualTable-off
// BSLLS:JoinWithVirtualTable-on

Parameter for config

"JoinWithVirtualTable": false