LogoLogo
ReleasesHomepageBlogSlack
3.0
3.0
  • Welcome
  • Concept
  • SQLWATCH Database
    • Requirements
      • Permissions
      • Performance Overhead
      • Storage Utilisation
    • Installation
      • Install with dbatools
      • Install with SqlPackage
      • Install with SSMS
      • Deploy from source code
      • Optional Components
      • Upgrade
      • Removal
      • Downgrade
    • Configuration
    • Known Issues
      • Collation conflict
      • Database drift
      • Login failed error when running disk logger
      • Deadlock when creating database
    • Notifications
      • Checks
      • Actions
      • Reports
      • How To
        • Add or modify check
        • Add or modify action
        • Add or modify report
      • Process Flow
    • Large Environments
  • Central Repository
    • Requirements
      • Performance overhead on the remote instance
      • Permissions
    • Installation
      • Removal
      • Upgrade
    • Configuration
    • Known Issues
  • Power BI Dashboard
    • Requirements
      • Permissions
    • Installation
    • Configuration
    • Known Issues
      • Power BI Load Errors
    • Performance
  • Grafana Dashboard
    • Requirements
    • Installation
    • Configuration
  • Azure Log Analytics Dashboard
    • Concept
    • Requirements
    • Installation
    • Configuration
  • Design Decision
    • Relations
    • Trend Tables
    • Data Types
      • Real Type
    • Primary Keys
    • Data Compression
    • Configuration Items
    • Using Apply instead of Join
  • Reference
    • Data-Tier Application Package
  • Integrations
    • Send notifications to Slack and Teams
    • dbachecks
  • FAQ
    • How do I check if SQLWATCH is running OK?
    • I am not seeing any data in Power BI
    • Can I modify default checks?
    • The app_log is growing fast
Powered by GitBook
On this page

Was this helpful?

  1. Design Decision

Using Apply instead of Join

You will notice a lot of the dimension views use OUTER APPLY instead of the LEFT JOIN . Outer apply is significantly slower than left join but it only "triggers" when columns are being selected. If the select statement does not include columns from the apply statement, the apply is not being run at all. This is different to a join behaviour where the join is always executed regardless what columns are being selected.

The dimension views have been optimised for Power BI and the APPLY does not fire when used via Power BI. However, as the application is universal, additional columns where included in the views to make manual queries easier. This approach gives significant performance boost in a "normal" operation but with the added benefit of flexibility when required.

If you are querying the views manually and need to return columns from the apply routine, please make sure you have a WHERE clause to limit the number of rows/iterations.

PreviousConfiguration ItemsNextData-Tier Application Package

Last updated 4 years ago

Was this helpful?