Comments
-
When you tested the INNER JOINs, did you update the query to use the UNIONs as well (between the different selects for each target table)? Substituting INNER for LEFT joins in the original query would have a much different effect.
-
Thanks for the clarification and the sample query. The LEFT JOINs in your query would be retrieving ALL values from the big table, and only matches from the smaller tables. Since you are only looking for the ones with matching keys (eliminating NULLs from non-matches with COALESCE), I think the INNER JOIN approach with…
-
The indexed view option doesn't modify the data or fields of the underlying tables, but it does introduce schemabinding and prevents structural changes to the underlying tables that may impact the indexed view unless you drop the view first. Some additional info with sample queries in this article:…
-
How often are these tables updated? Perhaps the indexed view option could still be worth a shot? Are the join column(s) indexed? Would it be possible to show the attempted view query and associated query plan for additional context?
-
[quote userid="2109" url="~/groups/data-driven/f/forum/101141/multi-target-query-assistance/317197"]I should have prefaced this with "This is a vendor database and we do not own the schema."[/quote]Ah, fun! While you don't own the schema, are you free to add indexes or views as long as there aren't any drastic changes that…
-
Is there a certain structure to the breakdown of data in Content1 and Content2, and what is the reasoning of them being two separate tables (they appear to have the same definition)? For example, are newer records (by CreatedDateUtc) in Content2 and older records in Content1? Also, what was the bottleneck with performance…
-
We struggled with this alert not being actionable at times also. I believe it is triggered by the bit value in sys.dm_os_sys_memory, which is triggered by a signal from Windows. You could try digging into other logs from Windows in attempt to find the reason, but I found it better to use other alert conditions to identify…