{
    "api_version": "1",
    "kind": "dse_post",
    "self": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
    "item": {
        "id": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
        "slug": "dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range",
        "url": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
        "alternate_urls": {
            "markdown": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range.md",
            "json": "https://update.dsesecurity.com/api/v1/posts/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/"
        },
        "title": "Bound every log-query branch before trusting a short displayed time range",
        "summary": "Why can a Log Analytics query for recent data still scan an entire table's history?",
        "format": {
            "slug": "guide",
            "name": "Guide"
        },
        "priority": {
            "slug": "info",
            "name": "Information"
        },
        "featured": false,
        "image": {
            "theme": "network-infrastructure",
            "label": "Networks & infrastructure",
            "alt": "Resilient network core with engineered blue and gold data paths.",
            "card_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-card.webp?v=1.8.20",
            "hero_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-hero.webp?v=1.8.20",
            "social_url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
            "width": 2400,
            "height": 1350
        },
        "topics": [
            {
                "slug": "it",
                "name": "IT",
                "url": "https://update.dsesecurity.com/topic/it/"
            },
            {
                "slug": "networks-infrastructure",
                "name": "Networks & Infrastructure",
                "url": "https://update.dsesecurity.com/topic/networks-infrastructure/"
            }
        ],
        "author": {
            "name": "DSE Security Editorial Team",
            "url": "https://update.dsesecurity.com/#editorial-team",
            "type": "Organization"
        },
        "publisher": {
            "name": "Detection Systems & Engineering",
            "url": "https://dsesecurity.com/"
        },
        "published_at": "2026-09-10T00:25:44+00:00",
        "modified_at": "2026-09-10T02:01:56+00:00",
        "reviewed_on": "2026-09-09",
        "reading_minutes": 2,
        "word_count": 254,
        "potentially_affected": "Azure Monitor Logs queries containing joins, unions or other subqueries.",
        "dse_recommendation": "Make each branch's intended TimeGenerated boundary explicit and verify that any optimization preserves the investigative question.",
        "primary_source": {
            "name": "Optimize log queries in Azure Monitor - Azure Monitor | Microsoft Learn",
            "url": "https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization",
            "published_on": null,
            "authority": "Microsoft Learn"
        },
        "publishing_principles": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
        "usage_info": "https://update.dsesecurity.com/usage/",
        "copyright_notice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
        "content_html": "<h2>Source facts</h2>\n<p>Azure Monitor Logs partitions data by TimeGenerated. Microsoft&#8217;s optimization guidance requires a time filter in each subquery: a recent-data filter on one join input does not automatically bound another input. Its example shows an unbounded latest-record aggregation scanning the other table&#8217;s history. Filtering after a union can likewise leave earlier branch scans unbounded. <a href=\"https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn</a>.</p>\n<p>The measured scan span can exceed the requested interval because entire storage partitions are read. In multi-region or multi-workspace queries, that indicator can also cover only part of the execution. It is not an exact global measure of the requested window. <a href=\"https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn</a>.</p>\n<h2>Applicability</h2>\n<p>Review Azure Monitor Logs queries containing joins, unions or other subqueries, especially when the same query moves between interfaces. Identify whether each branch should retrieve recent activity or an older last-known state before changing its scope.</p>\n<h2>DSE recommendation</h2>\n<p>DSE recommends annotating the intended time window beside each table reference during query review. Where the branches should share a boundary, use one clearly defined cutoff consistently. Do not discard an intentionally older state record merely to make a performance number smaller. Ask the investigation owner to approve any change in the question being answered.</p>\n<h2>Verification</h2>\n<p>Compare results before and after the proposed filters over a known dataset. Inspect the query&#8217;s processed time span and execution details while allowing for partition and cross-workspace measurement limitations. Check records near the boundary and known older state records. Retain both the semantic comparison and performance observations before promoting the revised query.</p>\n<h2>Official references</h2>\n<p><a href=\"https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft Learn: Optimize log queries</a>.</p>",
        "content_text": "Source facts\nAzure Monitor Logs partitions data by TimeGenerated. Microsoft’s optimization guidance requires a time filter in each subquery: a recent-data filter on one join input does not automatically bound another input. Its example shows an unbounded latest-record aggregation scanning the other table’s history. Filtering after a union can likewise leave earlier branch scans unbounded. Microsoft Learn.\nThe measured scan span can exceed the requested interval because entire storage partitions are read. In multi-region or multi-workspace queries, that indicator can also cover only part of the execution. It is not an exact global measure of the requested window. Microsoft Learn.\nApplicability\nReview Azure Monitor Logs queries containing joins, unions or other subqueries, especially when the same query moves between interfaces. Identify whether each branch should retrieve recent activity or an older last-known state before changing its scope.\nDSE recommendation\nDSE recommends annotating the intended time window beside each table reference during query review. Where the branches should share a boundary, use one clearly defined cutoff consistently. Do not discard an intentionally older state record merely to make a performance number smaller. Ask the investigation owner to approve any change in the question being answered.\nVerification\nCompare results before and after the proposed filters over a known dataset. Inspect the query’s processed time span and execution details while allowing for partition and cross-workspace measurement limitations. Check records near the boundary and known older state records. Retain both the semantic comparison and performance observations before promoting the revised query.\nOfficial references\nMicrosoft Learn: Optimize log queries.",
        "content_markdown": "## Source facts\n\nAzure Monitor Logs partitions data by TimeGenerated. Microsoft’s optimization guidance requires a time filter in each subquery: a recent-data filter on one join input does not automatically bound another input. Its example shows an unbounded latest-record aggregation scanning the other table’s history. Filtering after a union can likewise leave earlier branch scans unbounded. [Microsoft Learn](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization).\n\nThe measured scan span can exceed the requested interval because entire storage partitions are read. In multi-region or multi-workspace queries, that indicator can also cover only part of the execution. It is not an exact global measure of the requested window. [Microsoft Learn](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization).\n\n## Applicability\n\nReview Azure Monitor Logs queries containing joins, unions or other subqueries, especially when the same query moves between interfaces. Identify whether each branch should retrieve recent activity or an older last-known state before changing its scope.\n\n## DSE recommendation\n\nDSE recommends annotating the intended time window beside each table reference during query review. Where the branches should share a boundary, use one clearly defined cutoff consistently. Do not discard an intentionally older state record merely to make a performance number smaller. Ask the investigation owner to approve any change in the question being answered.\n\n## Verification\n\nCompare results before and after the proposed filters over a known dataset. Inspect the query’s processed time span and execution details while allowing for partition and cross-workspace measurement limitations. Check records near the boundary and known older state records. Retain both the semantic comparison and performance observations before promoting the revised query.\n\n## Official references\n\n[Microsoft Learn: Optimize log queries](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization)."
    },
    "json_ld": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://dsesecurity.com/#organization",
                "name": "Detection Systems & Engineering",
                "alternateName": "DSE Security",
                "url": "https://dsesecurity.com/",
                "logo": {
                    "@type": "ImageObject",
                    "url": "https://update.dsesecurity.com/assets/dse-logo-20260812.png?v=1.8.20"
                }
            },
            {
                "@type": "Organization",
                "@id": "https://update.dsesecurity.com/#editorial-team",
                "name": "DSE Security Editorial Team",
                "url": "https://update.dsesecurity.com/",
                "parentOrganization": {
                    "@id": "https://dsesecurity.com/#organization"
                }
            },
            {
                "@type": "WebSite",
                "@id": "https://update.dsesecurity.com/#website",
                "name": "DSE Updates",
                "alternateName": "DSE Security Knowledge Hub",
                "url": "https://update.dsesecurity.com/",
                "inLanguage": "en-US",
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "potentialAction": {
                    "@type": "SearchAction",
                    "target": {
                        "@type": "EntryPoint",
                        "urlTemplate": "https://update.dsesecurity.com/?q={search_term_string}"
                    },
                    "query-input": "required name=search_term_string"
                }
            },
            {
                "@type": "WebPage",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
                "isPartOf": {
                    "@id": "https://update.dsesecurity.com/#website"
                },
                "lastReviewed": "2026-09-09"
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/#breadcrumbs",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "DSE Updates",
                        "item": "https://update.dsesecurity.com/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Bound every log-query branch before trusting a short displayed time range",
                        "item": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/"
                    }
                ]
            },
            {
                "@type": [
                    "Article",
                    "TechArticle"
                ],
                "@id": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/#article",
                "identifier": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
                "url": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/",
                "headline": "Bound every log-query branch before trusting a short displayed time range",
                "description": "Why can a Log Analytics query for recent data still scan an entire table's history?",
                "abstract": "Why can a Log Analytics query for recent data still scan an entire table's history?",
                "articleBody": "Source facts\nAzure Monitor Logs partitions data by TimeGenerated. Microsoft’s optimization guidance requires a time filter in each subquery: a recent-data filter on one join input does not automatically bound another input. Its example shows an unbounded latest-record aggregation scanning the other table’s history. Filtering after a union can likewise leave earlier branch scans unbounded. Microsoft Learn.\nThe measured scan span can exceed the requested interval because entire storage partitions are read. In multi-region or multi-workspace queries, that indicator can also cover only part of the execution. It is not an exact global measure of the requested window. Microsoft Learn.\nApplicability\nReview Azure Monitor Logs queries containing joins, unions or other subqueries, especially when the same query moves between interfaces. Identify whether each branch should retrieve recent activity or an older last-known state before changing its scope.\nDSE recommendation\nDSE recommends annotating the intended time window beside each table reference during query review. Where the branches should share a boundary, use one clearly defined cutoff consistently. Do not discard an intentionally older state record merely to make a performance number smaller. Ask the investigation owner to approve any change in the question being answered.\nVerification\nCompare results before and after the proposed filters over a known dataset. Inspect the query’s processed time span and execution details while allowing for partition and cross-workspace measurement limitations. Check records near the boundary and known older state records. Retain both the semantic comparison and performance observations before promoting the revised query.\nOfficial references\nMicrosoft Learn: Optimize log queries.",
                "datePublished": "2026-09-10T00:25:44+00:00",
                "dateModified": "2026-09-10T02:01:56+00:00",
                "mainEntityOfPage": {
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/"
                },
                "inLanguage": "en-US",
                "isAccessibleForFree": true,
                "author": {
                    "@type": "Organization",
                    "name": "DSE Security Editorial Team",
                    "url": "https://update.dsesecurity.com/#editorial-team"
                },
                "publisher": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "image": {
                    "@type": "ImageObject",
                    "@id": "https://update.dsesecurity.com/updates/dse-20260909-372-bound-every-log-query-branch-before-trusting-a-short-displayed-time-range/#primaryimage",
                    "url": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
                    "contentUrl": "https://update.dsesecurity.com/assets/editorial/network-infrastructure-social-v2.jpg?v=1.8.20",
                    "width": 1200,
                    "height": 630,
                    "caption": "Bound every log-query branch before trusting a short displayed time range"
                },
                "articleSection": [
                    "IT",
                    "Networks & Infrastructure"
                ],
                "keywords": [
                    "IT",
                    "Networks & Infrastructure",
                    "Guide",
                    "Information priority"
                ],
                "genre": "Guide",
                "about": [
                    {
                        "@type": "Thing",
                        "name": "IT",
                        "url": "https://update.dsesecurity.com/topic/it/"
                    },
                    {
                        "@type": "Thing",
                        "name": "Networks & Infrastructure",
                        "url": "https://update.dsesecurity.com/topic/networks-infrastructure/"
                    }
                ],
                "wordCount": 254,
                "timeRequired": "PT2M",
                "publishingPrinciples": "https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/",
                "usageInfo": "https://update.dsesecurity.com/usage/",
                "copyrightHolder": {
                    "@id": "https://dsesecurity.com/#organization"
                },
                "copyrightNotice": "Copyright © 2026 Detection Systems & Engineering. All rights reserved.",
                "citation": {
                    "@type": "CreativeWork",
                    "name": "Optimize log queries in Azure Monitor - Azure Monitor | Microsoft Learn",
                    "url": "https://learn.microsoft.com/en-us/azure/azure-monitor/logs/query-optimization"
                }
            }
        ]
    }
}