Some databases may be able to generate dynamic sufficiently rapidly to enable real time use. However, in other cases, even if the nested queries used in the general work quickly on their own, more complex queries involving joins between different tables may lead to performance degradation. There are several approaches that can be taken to optimizing performance and two of these are in the following subsections.