{"id":2636,"date":"2026-06-14T11:32:37","date_gmt":"2026-06-14T16:32:37","guid":{"rendered":"https:\/\/www.miaprova.com\/blog\/?p=2636"},"modified":"2026-06-14T11:32:38","modified_gmt":"2026-06-14T16:32:38","slug":"the-right-fix-for-expensive-aep-segments-move-the-math-upstream","status":"publish","type":"post","link":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/","title":{"rendered":"The Right Fix for Expensive AEP Segments: Move the Math Upstream"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>A follow-up on our batch segmentation investigation \u2014 and the architectural pattern that eliminates the problem at its source.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In our <a href=\"https:\/\/www.miaprova.com\/blog\/why-your-most-expensive-aep-audience-might-be-your-newest-one\/\">last post<\/a>, we walked through how a single newly published audience caused a large retailer&#8217;s nightly AEP batch segmentation job to run for 7.3 hours instead of 3.5. The likely culprit was a segment that combined a 720-day purchase history scan, a multi-entity product lookup join, and a sum aggregation \u2014 all executed at query time, for millions of profiles, every single night.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When we shared those findings with the client, their response was exactly what you&#8217;d hope for from a sophisticated enterprise team. They already knew. And they were already fixing it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;This is great perspective to have,&#8221; they told us. &#8220;Unfortunately, this isn&#8217;t an uncommon approach to targeting in the addressable channel space. We&#8217;re combatting this by pulling aggregation for transactions across different product groups upstream and applying it as an attribute on the profile. We&#8217;re in the QA phase on this data now and are hoping to implement later this year.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That response is worth unpacking because what they&#8217;re describing is one of the most important architectural patterns in enterprise CDP practice, and it&#8217;s the correct long-term answer to a class of performance problems that affects almost every mature AEP deployment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What &#8220;Pulling Aggregation Upstream&#8221; Actually Means<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To understand the fix, you need to understand what made the original segment expensive in the first place.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The segment was asking AEP&#8217;s batch engine a complex question at query time: has this profile spent at least $150 on a specific product hierarchy in the last 720 days? To answer that question for a single profile, AEP had to retrieve two years of purchase events, join each event to a product lookup dataset to verify the hierarchy, filter down to matching records, sum the sale prices, and compare the result to the threshold.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That sequence is computationally expensive for one profile. Multiplied across seven million profiles in the base audience, run every night, it becomes a batch job that doubles in runtime.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The upstream pre-aggregation pattern breaks this cycle by separating when the math happens from when the segment runs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of asking AEP to compute the answer at segment evaluation time, an upstream pipeline \u2014 running on a schedule, with direct access to the full transaction history \u2014 computes the answer in advance for every profile. The result gets written back to the profile as a simple attribute:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>profile.computed.product_hierarchy_spend_l2y = $187.50<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The nightly segment then becomes a single field comparison:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>profile.computed.product_hierarchy_spend_l2y &gt;= 150<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">AEP reads one value. No event scan. No lookup join. No aggregation. The computation that previously took hours of batch time now takes milliseconds per profile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is the fundamental tradeoff: you move expensive, repeated computation out of the segmentation layer and into a dedicated pipeline that runs it once, efficiently, and stores the result where it can be reused cheaply.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"678\" src=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_beforeafter-1-1024x678.png\" alt=\"\" class=\"wp-image-2641\" srcset=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_beforeafter-1-1024x678.png 1024w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_beforeafter-1-300x199.png 300w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_beforeafter-1-768x508.png 768w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_beforeafter-1-1536x1016.png 1536w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_beforeafter-1-2048x1355.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Why &#8220;Different Product Groups&#8221; Is the Important Part<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The detail in their response that signals mature thinking is the phrase &#8220;across different product groups.&#8221; They are not building a one-off fix for the specific segment that caused last week&#8217;s spike. They are building a generalized framework.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A naive approach would be to create a pre-computed attribute for this one segment&#8217;s product hierarchy \u2014 department 700, sub-department 24, class 3, 720-day window. That solves today&#8217;s problem but creates a new one: every future segment that needs purchase aggregation across a different product group requires its own new attribute, its own pipeline, and its own maintenance burden.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The smarter approach, which is what they appear to be doing, is to define a standard set of aggregations across the product taxonomy \u2014 by department, by sub-department, by class, by brand, perhaps at multiple time windows \u2014 and compute all of them in a single pipeline run. The result is a library of pre-computed spend attributes that any segment builder can use without triggering a new event scan.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>profile.computed.dept_700_spend_l30d   = $45.00\nprofile.computed.dept_700_spend_l90d   = $112.00\nprofile.computed.dept_700_spend_l365d  = $187.50\nprofile.computed.dept_700_spend_l720d  = $312.00\nprofile.computed.dept_500_spend_l90d   = $67.00\n... and so on across the product hierarchy<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Every segment that would previously have required a 720-day event scan and a multi-entity join now reads a pre-computed field. The batch job gets faster with every attribute that gets migrated to this pattern, not slower with every new segment that gets built.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"632\" src=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_attrlibrary-1024x632.png\" alt=\"\" class=\"wp-image-2639\" srcset=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_attrlibrary-1024x632.png 1024w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_attrlibrary-300x185.png 300w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_attrlibrary-768x474.png 768w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_attrlibrary-1536x949.png 1536w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_attrlibrary-2048x1265.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">The Architecture Behind the Pattern<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The &#8220;upstream pipeline&#8221; they reference is almost certainly a purpose-built data processing job running outside of AEP \u2014 likely on Databricks, Spark, or a similar compute framework with direct access to the full transaction history. The workflow looks roughly like this:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A scheduled job pulls the raw transaction data from its source, which might be a data warehouse, a raw dataset in AEP&#8217;s data lake, or a direct feed from the point-of-sale system. It applies the aggregation logic \u2014 grouping by profile identity, filtering by product hierarchy, summing sale amounts, computing values at each lookback window. The results get written to a flat dataset where each row is a profile and each column is a pre-computed metric. That dataset gets ingested into AEP as a profile attribute dataset on a daily schedule, updating the values on each profile before the nightly batch segmentation job runs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The segmentation job then finds fresh, pre-computed values already sitting on each profile and reads them directly. The event history never gets touched during segmentation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Tradeoff: Speed for Freshness<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Pre-aggregated attributes are not free. They introduce a data freshness window that doesn&#8217;t exist with real-time event scans.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When a segment directly scans event history, it is always working with the most recent data in the profile store. A purchase made at 11pm will be reflected in a midnight batch job. When a segment reads a pre-computed attribute, it is working with data that is as fresh as the last pipeline run. If the aggregation pipeline runs at 10pm and the batch segmentation job runs at midnight, a purchase made at 11pm won&#8217;t be reflected until tomorrow night&#8217;s pipeline run updates the attribute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For most marketing use cases \u2014 email campaigns, SMS targeting, direct mail \u2014 a 24-hour freshness window is completely acceptable. The commercial decision to target someone based on their spend history is rarely so time-sensitive that a one-day lag matters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Where it does matter is in real-time or near-real-time personalization scenarios: website recommendations, triggered messaging, next-best-action decisions that need to respond to behavior from earlier the same day. For those use cases, the pre-aggregation pattern needs to either run more frequently (hourly pipelines rather than daily) or be complemented by streaming computed attributes that update in real time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The architecture teams building these systems make this tradeoff explicitly. The question is not whether to pre-aggregate, but at what frequency and for which use cases.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_freshness_tradeoff-1024x512.png\" alt=\"\" class=\"wp-image-2638\" srcset=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_freshness_tradeoff-1024x512.png 1024w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_freshness_tradeoff-300x150.png 300w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_freshness_tradeoff-768x384.png 768w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_freshness_tradeoff-1536x768.png 1536w, https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_freshness_tradeoff-2048x1024.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Adobe&#8217;s Native Answer: Computed Attributes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It is worth noting that AEP has a native feature designed for exactly this pattern. Computed Attributes \u2014 available in the Real-Time CDP product \u2014 allow you to define aggregations over profile event data and have AEP maintain running values that are exposed as profile fields. You define the logic once in the AEP interface, and the platform keeps the attribute current on an ongoing basis without requiring a separate external pipeline.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The fact that a mature enterprise team is building their own upstream aggregation pipeline rather than using native Computed Attributes is instructive. It suggests one or more of the following is true for their implementation: the product hierarchy complexity or the lookback window length exceeds what native Computed Attributes handles efficiently, they have an existing data infrastructure investment (Databricks appears throughout their pipeline data) that makes the upstream approach more practical, they need tighter control over the computation logic or the ingestion schedule than the native feature allows, or the cost model for their AEP contract makes the native feature less attractive than running compute externally.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">None of these are criticisms \u2014 they are architectural realities for large enterprises. Native Computed Attributes are genuinely useful and worth evaluating for teams that don&#8217;t have the data engineering capacity to build and maintain external pipelines. The important thing is that both paths lead to the same result: expensive event scan logic gets moved out of the segmentation layer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What This Means for Segment Builders<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you are building audience definitions in AEP Segment Builder and you find yourself constructing logic that involves purchase history aggregations, time-windowed spend calculations, or event count thresholds over long lookback windows, it is worth asking a question before you publish: is this computation already available as a profile attribute, or should it be?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The answer shapes not just your segment&#8217;s performance but the entire batch job&#8217;s runtime for every other audience in the org that runs alongside it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A few signals that a segment definition is a candidate for the pre-aggregation pattern:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any lookback window longer than 90 days combined with a sum or count aggregation is almost certainly better served by a pre-computed attribute. The event scan volume grows linearly with the window length, and the aggregation has to run from scratch every night regardless of whether the profile&#8217;s qualifying behavior has changed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Multi-entity joins inside event logic are expensive even at short lookback windows. If your segment needs to filter events by attributes that live in a lookup dataset \u2014 product hierarchy, store attributes, category taxonomy \u2014 the join cost is real and recurring. Pre-computing the filtered aggregate and storing it as a profile attribute eliminates the join entirely at segment evaluation time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any aggregation that will be reused across multiple segments is a strong candidate. If three different segments all need some variant of &#8220;spent $X on product category Y in the last Z days,&#8221; that computation should run once in a pipeline and be read many times from a profile attribute, not recomputed independently in each segment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Broader Lesson<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">What this client is building is not a workaround. It is a data architecture pattern that scales where query-time aggregation does not. Every enterprise running a large segment inventory on a mature customer profile will eventually hit the same wall \u2014 and the teams that have thought about this pattern in advance are the ones whose batch jobs stay predictable as the business grows and the audience definitions get more sophisticated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The nightly batch window is a shared resource. Every segment definition in your org competes for the same infrastructure during that window. A segment that scans two years of event history and joins to a lookup dataset for seven million profiles is not just slow for itself \u2014 it is slow for everyone else running alongside it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moving that computation upstream is not just a performance optimization. It is a form of operational citizenship for your AEP environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll be tracking how this client&#8217;s implementation progresses \u2014 and what the impact looks like in MiaProva&#8217;s Daily Batch Job Monitor once the pre-aggregated attributes are live in production. That before-and-after comparison is a story worth telling.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><em>MiaProva is an AEP observability, monitoring, and optimization management platform built for teams running Adobe Experience Platform at enterprise scale. Learn more at <a href=\"https:\/\/miaprova.com\">miaprova.com<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A follow-up on our batch segmentation investigation \u2014 and the architectural pattern that eliminates the problem at its source. In our last post, we walked through how a single newly published audience caused a large retailer&#8217;s nightly AEP batch segmentation job to run for 7.3 hours instead of 3.5. The likely culprit was a segment&#8230;<\/p>\n","protected":false},"author":2,"featured_media":2643,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[6,363,364],"tags":[],"class_list":["post-2636","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adobe","category-aep","category-rt-cdp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The Right Fix for Expensive AEP Segments: Move the Math Upstream - MiaProva Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The Right Fix for Expensive AEP Segments: Move the Math Upstream - MiaProva Blog\" \/>\n<meta property=\"og:description\" content=\"A follow-up on our batch segmentation investigation \u2014 and the architectural pattern that eliminates the problem at its source. In our last post, we walked through how a single newly published audience caused a large retailer&#8217;s nightly AEP batch segmentation job to run for 7.3 hours instead of 3.5. The likely culprit was a segment...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\" \/>\n<meta property=\"og:site_name\" content=\"MiaProva Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MiaProvaSoftware\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-14T16:32:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-14T16:32:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1431\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Brian Hawkins\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brianthawkins\" \/>\n<meta name=\"twitter:site\" content=\"@brianthawkins\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brian Hawkins\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\"},\"author\":{\"name\":\"Brian Hawkins\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/#\/schema\/person\/0068d06d7a71d8edd4ac807bee6148d3\"},\"headline\":\"The Right Fix for Expensive AEP Segments: Move the Math Upstream\",\"datePublished\":\"2026-06-14T16:32:37+00:00\",\"dateModified\":\"2026-06-14T16:32:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\"},\"wordCount\":1836,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png\",\"articleSection\":[\"Adobe\",\"AEP\",\"RT-CDP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\",\"url\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\",\"name\":\"The Right Fix for Expensive AEP Segments: Move the Math Upstream - MiaProva Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png\",\"datePublished\":\"2026-06-14T16:32:37+00:00\",\"dateModified\":\"2026-06-14T16:32:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage\",\"url\":\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png\",\"contentUrl\":\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png\",\"width\":2560,\"height\":1431},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.miaprova.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The Right Fix for Expensive AEP Segments: Move the Math Upstream\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/#website\",\"url\":\"https:\/\/www.miaprova.com\/blog\/\",\"name\":\"MiaProva - Optimization Management\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.miaprova.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/#organization\",\"name\":\"MiaProva\",\"url\":\"https:\/\/www.miaprova.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2024\/03\/favicon-96x96-1.webp\",\"contentUrl\":\"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2024\/03\/favicon-96x96-1.webp\",\"width\":96,\"height\":96,\"caption\":\"MiaProva\"},\"image\":{\"@id\":\"https:\/\/www.miaprova.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MiaProvaSoftware\/\",\"https:\/\/x.com\/brianthawkins\",\"https:\/\/www.linkedin.com\/company\/miaprova\/\",\"https:\/\/www.youtube.com\/channel\/UCdm5r7ZVgyYfaMQvuOvqVlA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/#\/schema\/person\/0068d06d7a71d8edd4ac807bee6148d3\",\"name\":\"Brian Hawkins\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.miaprova.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/74ea98c8139bde705e154b8b91ec2edc9d24b9e5cd03fc555aa2f13ec334e5f7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/74ea98c8139bde705e154b8b91ec2edc9d24b9e5cd03fc555aa2f13ec334e5f7?s=96&d=mm&r=g\",\"caption\":\"Brian Hawkins\"},\"url\":\"https:\/\/www.miaprova.com\/blog\/author\/brianmiaprova-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The Right Fix for Expensive AEP Segments: Move the Math Upstream - MiaProva Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/","og_locale":"en_US","og_type":"article","og_title":"The Right Fix for Expensive AEP Segments: Move the Math Upstream - MiaProva Blog","og_description":"A follow-up on our batch segmentation investigation \u2014 and the architectural pattern that eliminates the problem at its source. In our last post, we walked through how a single newly published audience caused a large retailer&#8217;s nightly AEP batch segmentation job to run for 7.3 hours instead of 3.5. The likely culprit was a segment...","og_url":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/","og_site_name":"MiaProva Blog","article_publisher":"https:\/\/www.facebook.com\/MiaProvaSoftware\/","article_published_time":"2026-06-14T16:32:37+00:00","article_modified_time":"2026-06-14T16:32:38+00:00","og_image":[{"width":2560,"height":1431,"url":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png","type":"image\/png"}],"author":"Brian Hawkins","twitter_card":"summary_large_image","twitter_creator":"@brianthawkins","twitter_site":"@brianthawkins","twitter_misc":{"Written by":"Brian Hawkins","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#article","isPartOf":{"@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/"},"author":{"name":"Brian Hawkins","@id":"https:\/\/www.miaprova.com\/blog\/#\/schema\/person\/0068d06d7a71d8edd4ac807bee6148d3"},"headline":"The Right Fix for Expensive AEP Segments: Move the Math Upstream","datePublished":"2026-06-14T16:32:37+00:00","dateModified":"2026-06-14T16:32:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/"},"wordCount":1836,"commentCount":0,"publisher":{"@id":"https:\/\/www.miaprova.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage"},"thumbnailUrl":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png","articleSection":["Adobe","AEP","RT-CDP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/","url":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/","name":"The Right Fix for Expensive AEP Segments: Move the Math Upstream - MiaProva Blog","isPartOf":{"@id":"https:\/\/www.miaprova.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage"},"image":{"@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage"},"thumbnailUrl":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png","datePublished":"2026-06-14T16:32:37+00:00","dateModified":"2026-06-14T16:32:38+00:00","breadcrumb":{"@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#primaryimage","url":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png","contentUrl":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2026\/06\/blog2_featured-1-scaled.png","width":2560,"height":1431},{"@type":"BreadcrumbList","@id":"https:\/\/www.miaprova.com\/blog\/the-right-fix-for-expensive-aep-segments-move-the-math-upstream\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.miaprova.com\/blog\/"},{"@type":"ListItem","position":2,"name":"The Right Fix for Expensive AEP Segments: Move the Math Upstream"}]},{"@type":"WebSite","@id":"https:\/\/www.miaprova.com\/blog\/#website","url":"https:\/\/www.miaprova.com\/blog\/","name":"MiaProva - Optimization Management","description":"","publisher":{"@id":"https:\/\/www.miaprova.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.miaprova.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.miaprova.com\/blog\/#organization","name":"MiaProva","url":"https:\/\/www.miaprova.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.miaprova.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2024\/03\/favicon-96x96-1.webp","contentUrl":"https:\/\/www.miaprova.com\/blog\/wp-content\/uploads\/2024\/03\/favicon-96x96-1.webp","width":96,"height":96,"caption":"MiaProva"},"image":{"@id":"https:\/\/www.miaprova.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MiaProvaSoftware\/","https:\/\/x.com\/brianthawkins","https:\/\/www.linkedin.com\/company\/miaprova\/","https:\/\/www.youtube.com\/channel\/UCdm5r7ZVgyYfaMQvuOvqVlA"]},{"@type":"Person","@id":"https:\/\/www.miaprova.com\/blog\/#\/schema\/person\/0068d06d7a71d8edd4ac807bee6148d3","name":"Brian Hawkins","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.miaprova.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/74ea98c8139bde705e154b8b91ec2edc9d24b9e5cd03fc555aa2f13ec334e5f7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/74ea98c8139bde705e154b8b91ec2edc9d24b9e5cd03fc555aa2f13ec334e5f7?s=96&d=mm&r=g","caption":"Brian Hawkins"},"url":"https:\/\/www.miaprova.com\/blog\/author\/brianmiaprova-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/posts\/2636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/comments?post=2636"}],"version-history":[{"count":2,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/posts\/2636\/revisions"}],"predecessor-version":[{"id":2648,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/posts\/2636\/revisions\/2648"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/media\/2643"}],"wp:attachment":[{"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/media?parent=2636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/categories?post=2636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.miaprova.com\/blog\/wp-json\/wp\/v2\/tags?post=2636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}