Queries involving a large number of possible plans may run out
of memory during optimization. There are a number of settings that
influence query optimization memory utilization.
These are set in the virtuoso.ini file or can be altered on a
running system with __dbf_set function:
INI parameter name
__dbf_set function name
__dbf_set function description
Controlls the size limit in bytes for transient memory
consumption. Increasing this may help. The given value should be
over 10M, increasing this over 100M is seldom useful but can be
Decreasing will reduce the number of plans tried, hence save
memory. Reasonable values are 0 for no limit or somewhere in excess
of 500 for a limit.
Setting to 1 will stop optimization once the best plan is
expected to take less time and the amount of time spent optimizing
When set, will cause the optimizer to only consider next plan
candidates that are connected by a join to the existing partial
plan. In other words, no cartesian products will be considered.
This may save some space and time.
When reporting issues with query optimization it will be useful
to include statistics from the database in order to facilitate
reproducing the effect. The function stat_export() produces a
statistics summary that can be read back into another database with
the stat_import() function.