<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by John Kutay on Medium]]></title>
        <description><![CDATA[Stories by John Kutay on Medium]]></description>
        <link>https://medium.com/@john.kutay?source=rss-470a20bc2afb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*s-Op4ECuGFrczV93pmVQLA.jpeg</url>
            <title>Stories by John Kutay on Medium</title>
            <link>https://medium.com/@john.kutay?source=rss-470a20bc2afb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:04:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@john.kutay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building an AI Database for Agentic GTM Operations]]></title>
            <link>https://medium.com/@john.kutay/building-an-ai-database-for-agentic-gtm-operations-6a0c86fb8cdc?source=rss-470a20bc2afb------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a0c86fb8cdc</guid>
            <category><![CDATA[databricks]]></category>
            <category><![CDATA[growth-engineering]]></category>
            <category><![CDATA[apache-iceberg]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[snowflake]]></category>
            <dc:creator><![CDATA[John Kutay]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 05:33:09 GMT</pubDate>
            <atom:updated>2026-06-13T06:57:22.485Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How our growth engineering team rebuilt its go-to-market data foundation on a lakehouse — and turned it into a real-time intelligence layer for AI agents.</em></p><p><strong>By John Kutay</strong> — <em>Companion to my </em><a href="https://www.databricks.com/dataaisummit/session/building-ai-database-agentic-gtm-operations"><em>Data + AI Summit 2026 session of the same name</em></a><em>.</em></p><h3><strong>The dream state</strong></h3><p>Rippling’s Growth Engineering team had a clear ask: increase outbound velocity, lift conversion, keep CAC/Cost-Per-Lead in check and give GTM operators their time back.</p><p>So we set out to do the following:</p><ul><li>Automate data collection, enrichment, analysis, and recommendations so teams focus on marketing and selling, not writing SQL.</li><li>Surface real opportunities to sales: recently funded startups, executives taking on new jobs, cross-sell signals in target accounts the moment they appear.</li><li>Turn marketing ideas and sales plays into live campaigns as fast as we can prompt with our entire TAM in an agent’s context window.</li><li>Make it easy to answer questions like ‘How did our Super Bowl ad lift down-funnel metrics?’</li></ul><p>Rippling’s mission is to <a href="https://www.rippling.com/about">free smart people to work on hard problems</a>. We exist so the manager who accidentally became the benefits expert can stop chasing data and focus on work that actually moves the needle.</p><p>We wanted the same for our GTM team. With 1,000+ people in go-to-market and Rippling growing fast — from a leading HRIS into a unified AI platform for People Operations — we needed a data foundation that could keep up. One source of truth, built on primitives we could scale on.</p><p>Once we started building, it didn’t take long to learn the hardest problem in GTM isn’t volume.</p><p>It’s figuring out <strong><em>what’s actually f***ing real</em></strong>. More on that later.</p><h3>Building a production AI data platform</h3><p>A little over a year ago, our go-to-market data lived in the usual place: a traditional cloud data warehouse, a tangle of third-party SaaS exports, and a lot of human glue holding it together.</p><ul><li>Duplicate spend and work for ops and GTM teams. Duplicate leads, redundant enrichment spend, multiple reps contacting the same people. All things that bring conversion down, CAC up, escalations loud.</li><li>Manual work resolving data issues across 5–6 layers of ingest, transformation, and delivery into campaigns</li><li>Inability to implement agentic, high leverage workloads due to unreliable data models</li></ul><p>Today, that same function runs on a single lakehouse that powers AI/ML pipelines, ML-based entity resolution, and a real-time, natural-language interface used by more than <strong>1,500 people across the company using a unified source of truth for analytics and market intelligence data.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gil5EVdtugwlOOxb-TfO2Q.png" /></figure><p>I’ll go deeper on all of it at my Data + AI Summit session, <a href="https://www.databricks.com/dataaisummit/session/building-ai-database-agentic-gtm-operations"><strong>“Building an AI Database for Agentic GTM Operations.”</strong></a></p><h3>Why we rebuilt the GTM data foundation</h3><p>Our legacy warehouse was fine for reporting, probably a little over-extended for operational pipelines, but it strained the moment we wanted to do three things at once:</p><ol><li>Run <strong>AI/ML workloads</strong> (summarization, classification) directly on the data, close to where it lives.</li><li><strong>Unify identities</strong> across messy, overlapping third-party datasets preventing duplicative processing costs and wasteful administrative work.</li><li>Serve <strong>low-latency, interactive answers</strong> to both people and AI agents.</li></ol><p>We didn’t want three separate systems for those three needs. We wanted one source of truth.</p><h3>The bake-off: AI/ML pipelines, head to head</h3><p>Before committing, we ran a proof of concept that put two platforms directly against each other on the workloads we actually cared about: <strong>AI/ML pipelines doing summarization and classification</strong> at scale. We evaluated <strong>Databricks against Snowflake</strong>, our incumbent cloud data warehouse.</p><p>Databricks won on every metric that mattered to us:</p><ul><li><strong>Cost</strong> — materially cheaper to run the same pipelines.</li><li><strong>Speed</strong> — faster end-to-end on our processing and inference workloads.</li><li><strong>Access to hosted models</strong> — first-class, in-platform access to managed foundation models, so we weren’t shipping data out to a separate inference stack.</li></ul><p>That last point turned out to be the quiet differentiator. Keeping model inference next to governed data — instead of exporting it to yet another service — removed a whole category of plumbing, latency, and governance headaches.</p><h3>ML-based entity resolution across heterogeneous sources</h3><p>Earlier I mentioned how the biggest challenge was not scale but fidelity. The same company and person shows up a dozen different ways across third-party data providers, enrichment tools, and internal systems.</p><p>When scraping data from the web and an array of vendors, you need a system to resolve entities . Rule-based matching gets you partway and then collapses under edge cases.</p><p>We deployed <strong>machine-learning-based entity resolution</strong> to unify these records at scale — reconciling entities across heterogeneous third-party sources into a single view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*OkxhuMSYp58w1zVFjL4vdQ.png" /></figure><p>The system applies candidate blocking and then uses a supervised pairwise classifier to score whether two records represent the same entity. A lot of this was just ‘looking at the data’, labeling, black box testing, and understanding ground-truth throughout the process.</p><p>Each cluster is classified before survivorship:</p><ul><li>same person across providers when multiple vendors describe the same person with wiggle room for slight deviations.</li><li>job change when the same person appears tied to different companies.</li><li>internal job change when the company is the same but role/persona changed.</li><li>singleton when there is no meaningful merge.</li></ul><p>That classification step mattered because entity resolution is not only about deciding whether records match. It is about deciding what kind of match occurred, what should survive into the golden record, and which downstream GTM workflows can safely rely on the result.</p><p>We deployed the resolution pipeline as a Spark job across hundreds of millions of records pulled from many heterogeneous vendor sources — all with different schemas, null patterns, and identity anchor coverage.</p><p>Before any of that, we spent roughly a month living in notebooks: profiling columns, measuring fill rates, checking cardinality, inspecting null patterns, comparing vendor-specific quirks, and figuring out which fields were actually useful for blocking, scoring, and survivorship. Those column-level metrics became the practical tuning guide for the production job.</p><p><strong>The core challenge: pairwise record comparison is an n² operation.</strong></p><p>At that scale, brute force isn’t a strategy. Our resolution model builds a blocking tree during training to dramatically reduce the candidate pair space before scoring kicks in…so instead of comparing everything against everything, you’re only scoring pairs that have a realistic chance of being the same entity.</p><p>Training on the full dataset would have been unnecessary and expensive. Instead, we stratified a representative sample across four segments based on identity anchor availability records with both LinkedIn URL and email, LinkedIn only, email only, and neither. Smaller vendors got over-sampled to make sure the model saw enough cross-provider match pairs during active learning. Records with no LinkedIn URL at all got included in full — too rare to risk underrepresenting.</p><p>The production prediction job completed across thousands of Spark partitions. It took just under 40 hours. <strong>And yes I was awake for that entire time (along with teammates that I’m thankful for).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*Qceq9JVN_PsA-vAJTo3YXg.png" /><figcaption>Job 218, Stage 1053, Hours of Sleep 0.</figcaption></figure><p><strong>This is what “what’s actually real” means in practice</strong>. Every resolved entity carries a confidence score, a ranked audit of every source that contributed to the final canonical record — winners, losers, where they conflicted. We resolved millions of leads who no longer worked at the companies we had on file, surfaced real names, current addresses for companies, and flagged every conflict.</p><h3>How it fits together</h3><p>The whole system is one platform with a clean separation of concerns — incremental ingestion into a medallion lakehouse, ML entity resolution in the Silver layer, AI/ML pipelines and a real-time API on top, serving both people and agents.</p><h3>A real-time interface for agents: Genie at 2,000+ users</h3><p>The payoff layer is what our teams actually touch. Using the <strong>Genie API</strong>, we exposed a real-time, natural-language interface over our governed GTM data …and put it in the hands of our entire GTM org.</p><p>Just as importantly, it’s an interface for <strong>AI agents</strong>, not just people. Agents query it in real time to analyze a range of first- and third-party signals across the customer lifecycle, then act on what they find. We also have multiple internal text-to-sql implementations, but enjoyed the ergonomics of simply updating Genie in the Databricks in its UI to steer the agent, map out key joins, column definitions and synonyms.</p><h3>Semantic search at scale</h3><p>Pointing an LLM directly at a data warehouse feels magical at first — and it solved some real legit use cases. But it creates a different set of problems: every question re-pulls full records, re-runs extraction, and burns tokens doing reasoning that should have happened once. Cost compounds, latency varies, and nothing is auditable.</p><p>So we applied a new technical principle:</p><p><strong>DRY(E) — D</strong>on’t<strong> R</strong>epeat<strong> Y</strong>our<strong> E</strong>mbeddings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kl_mhVXlq6fe6oczG5fyHQ.png" /></figure><p>We released an agent that does semantic search over our library of sales-data — millions of conversations — so a rep, marketer or an agent acting on their behalf, can ask a plain-language question like “what objections come up most often in Stage 1 from IT leaders?” , “What coaching do I need to provide for the reps on my team?” and get a grounded answer in seconds.</p><p>The important part is that we don’t index raw data as giant blobs. That would be cheap to build and painful to use. Instead, we turn each conversation into a retrieval-ready corpus.</p><p>First, the pipeline identifies only new or changed conversations using Delta change tracking. Those calls become the worklist for the rest of the job, so daily refreshes scale with change volume rather than total corpus size.</p><p>We use conversation participant metadata and deterministic scoring to label each speaker side, then convert the transcript into readable turns like seller/customer lines. That distinction matters because the agent should reason primarily over buyer evidence, not seller talk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eYe86fQWmnel7RywhX8VbA.png" /><figcaption>Hybrid retrieval with fuzzy matching and predicate scans</figcaption></figure><p>Chunking isn’t just “split every N tokens.” We keep conversational context intact — merging short Q&amp;A exchanges, collapsing adjacent turns from the same speaker — so chunks are small enough for retrieval but still contain complete conversational meaning.</p><p>Before embedding, we run enrichment on each chunk: pain points, objections, buying triggers, competitor mentions, contract timing, sentiment. Chunks with little or no buyer speech get skipped entirely. We embed the enriched text, not the raw transcript, and keep the vector index lean — text, embeddings, and a small set of high-selectivity filters. Heavier business context stays in the lakehouse and gets joined after retrieval.</p><p>The alternative is dumping full transcripts into a context window every time. That works in a demo. In production it’s expensive, slow, and the model rediscovers the same structure on every call. We do the hard reasoning once, at ingestion. At query time the agent gets a compact, grounded evidence set — not a wall of text.</p><p>A few lessons held up:</p><p><strong>Use storage-optimized vector search for large indexes.</strong></p><p>Once a semantic index grows past a few million records, in-memory endpoints get expensive and brittle. We moved the transcript index onto <a href="https://www.databricks.com/blog/announcing-storage-optimized-endpoints-vector-search">storage-optimized Vector Search</a> — disk-backed and purpose-built for indexes ranging from millions to tens of millions of rows — and query latency settled into the tens of milliseconds even at multi-million-record scale.</p><p>Hybrid retrieval beats pure vectors. Sales conversations mix fuzzy concepts (“pricing concerns”) with exact terms: product names, competitors, account stages, acronyms. We combine dense semantic retrieval with keyword retrieval so both kinds of questions work.</p><p><strong>Index enriched evidence, not just raw text.</strong></p><p>The best retrieval text is still faithful to the conversation, but it has enough structure for the model to understand what kind of signal it is seeing. Inline tags and normalized classifications made downstream answers more grounded.</p><p><strong>Separate retrieval from analytics.</strong></p><p>The index should retrieve candidates quickly. The lakehouse should provide the full business context after retrieval. Keeping those jobs separate gave us a smaller index, faster queries, and richer final answers.</p><p><strong>Design for updates, not rebuilds.</strong></p><p>Transcript text, embeddings, and business context do not all change at the same rate. Treating them as separate update paths let us refresh what changed without recomputing what did not.</p><p>The meta-lesson: size your vector index for where the data will be in a year, not where it starts, and design the pipeline around incremental synchronization from day one.</p><h3>The architectural principles that held up</h3><p>Four design choices did the heavy lifting, and I’d make all four again:</p><ul><li><strong>DRY(E) — Don’t Repeat Your Embeddings. </strong>Directly feeding warehouse records into LLM context for every MCP request wastes tokens and produces unpredictable results. The better pattern is to precompute the AI-ready representation once, then serve it repeatedly through a governed retrieval layer. (<em>And yes I did repeat this part about avoiding repetition).</em></li><li><strong>Incremental processing.</strong> We process new and changed data incrementally rather than reprocessing the world. It’s the difference between a pipeline that scales with your <em>changes</em> and one that scales with your <em>total data size</em> — only one of those stays affordable.</li><li><strong>Interoperable by default.</strong> We standardized on open table formats — <a href="https://docs.databricks.com/aws/en/delta/uniform"><strong>Delta tables supporting Iceberg reads </strong></a><strong>— </strong>so the data stays open and accessible to other engines and tools instead of being locked into one query path. Interop wasn’t an afterthought; it was the default.</li><li><strong>Medallion architecture.</strong> Bronze → Silver → Gold layering gave us a clean separation between raw ingestion, conformed/cleaned data, and business-ready tables. It’s unglamorous and it works — especially when multiple teams and agents consume the same Gold layer.</li></ul><h3>The victories</h3><p>A few outcomes we’re proud of:</p><ul><li>The platform went from <strong>essentially zero to a core piece of production infrastructure</strong> used by multiple teams including operations, data science, growth marketing and growth engineering in less than 3 months</li><li>Data-driven personalization for our sellers helped lift demos booked by <strong>about a third</strong> and new opportunities <strong>by roughly a fifth</strong> in a staged A/B test vs templated emails.</li><li>We increased the size of our addressable TAM by over 10 million potential new Rippling users</li><li>Centralizing the GTM database delivered <strong>double-digit growth in addressable market</strong> within the first month.</li><li>Generating a personalized, research-backed sales play became <strong>roughly an order of magnitude cheaper</strong> and <strong>dramatically faster</strong>.</li></ul><p>This also allowed the launch of GrowthOS — our multi-model agent harness for growth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ofvrB0wEB1jz0eDIYpta4Q.png" /></figure><h3>What’s next</h3><p>We’re extending the same foundation from customer-facing GTM intelligence toward adjacent functions — bringing the same incremental, interoperable, agent-ready patterns to more of the business. The thesis is simple: if your data layer is open, incremental, and queryable in real time by agents, you stop rebuilding infrastructure for every new use case.</p><p>Rippling is shipping faster than ever — expanding what it means to be an AI platform for People Operations, freeing more smart people from more manual work across every function. The same principle applies internally.</p><p>If any of this is useful for your own GTM or data platform work, come find me at my Data + AI Summit session, <strong>“Building an AI Database for Agentic GTM Operations.”</strong> <em>(</em><a href="https://www.databricks.com/dataaisummit/session/building-ai-database-agentic-gtm-operations"><em>Session link / time</em></a><em>)</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a0c86fb8cdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Materialized Views: Using DuckDB for In-Process Columnar Caching]]></title>
            <link>https://medium.com/striim/beyond-materialized-views-using-duckdb-for-in-process-columnar-caching-98b8387b8568?source=rss-470a20bc2afb------2</link>
            <guid isPermaLink="false">https://medium.com/p/98b8387b8568</guid>
            <category><![CDATA[duckdb]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[John Kutay]]></dc:creator>
            <pubDate>Wed, 02 Apr 2025 17:33:10 GMT</pubDate>
            <atom:updated>2025-04-02T17:38:27.830Z</atom:updated>
            <content:encoded><![CDATA[<p>Written by John Kutay (Director of Product &amp; Engineering at Striim) and <a href="https://medium.com/u/4135b41f7166">Kim</a> Dang (Senior Software Engineer at Striim)</p><p><strong>In this post we will talk about using DuckDB as the operational analytics store for the control plane of </strong><a href="https://signup-developer.striim.com/"><strong>Striim Developer</strong></a><strong> — a serverless Stream Processing and Change Data Capture service. By moving analytical queries from PostgreSQL to an in-process cache in DuckDB, we measured 5–10x performance improvement with zero additional infrastructure or cost.</strong></p><p>In this post, we explore how DuckDB was integrated as the analytical backend for the control plane of <strong>Striim Developer</strong> — a serverless Stream Processing and Change Data Capture (CDC) service. The Striim Developer Control Plane handles critical tasks such as managing tenant assignments, monitoring free-tier usage thresholds, orchestrating asynchronous jobs, and triggering operational alerts. Initially, this control plane relied on direct queries to PostgreSQL, which serves as the metadata repository. However, this design presented challenges in maintaining performance and meeting SLAs without inflating the cost of offering a free-tier service.</p><p>For example, when usage exceeds capacity for an individual tenant, we need to alert and orchestrate a response immediately. Yet, our previous implementation — based on periodic analytical jobs — was constrained to 15–20-minute intervals, requiring PostgreSQL query optimization and materialized views to perform better. This latency posed a significant bottleneck for operational analytics in a serverless platform that necessitates near real-time responses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*fJvaZS9pM95Vy_3GzTyT5A.png" /></figure><p>After evaluating alternatives, we adopted DuckDB as an in-process, columnar caching layer. This decision was driven by DuckDB’s balance of performance, simplicity, and minimal overhead, addressing our need for high-frequency analytics while offloading PostgreSQL. In this post, we detail the challenges, implementation, and benefits of this architecture and discuss whether this approach qualifies as Hybrid Transactional Analytical Processing (spoiler: it’s not, and I’ll explain why).</p><h3>The Challenge: Optimizing Operational Analytical Workloads</h3><p>The Striim Developer control plane frequently queries PostgreSQL to perform:</p><ul><li>Aggregated usage calculations</li><li>Threshold monitoring for user and tenant consumption.</li><li>Operational alerting</li><li>Asynchronous calls to cloud services that trigger workflows (in-product messages, cloud resource management)</li></ul><p>These queries are analytical and involve scanning and joining usage data normalized across many tables, leading to slower execution times and increased load on our PostgreSQL instance. However our ability to frequently run this operation was bottlenecked by disk-bound operations to query PostgreSQL. We require these analytical jobs to run as frequently as possible to execute to respond to scenarios like resource over-utilization or exceeding usage thresholds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ueyRs2vJFJZF81yvasskJg.png" /><figcaption>Database Application Behind Striim Developer</figcaption></figure><h3>A Word About Buffer Caches</h3><p>Before we went down this rabbit hole, we of course considered the stark reality that database buffer caches exist. And our AWS-managed database has some higher level interfaces to manage the buffer cache that adds some convenience for DBAs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*dj90ujb16hE0ESsN" /></figure><p>PostgreSQL’s buffer cache can improve query performance by storing frequently accessed data pages in memory, minimizing disk I/O. While tuning shared_buffers and leveraging tools like pg_prewarm could help keep critical data in cache, this approach is inherently reactive. The cache is populated dynamically based on usage patterns, which means frequent refreshes or large scans may still involve costly disk reads. Additionally, tuning buffer sizes in a multi-tenant environment adds complexity and can strain memory resources shared with other PostgreSQL processes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dG0Gq1TYfMXLRygU" /></figure><p>It’s also important to note that the Striim application is the software most frequently accessing the PostgreSQL metadata repository with frequent, write-heavy operations that naturally dominate the PostgreSQL buffer cache. It handles critical transactional operations like updating metering metrics and managing the Striim component DDL as streaming applications are implemented by users. This competition for cache space means analytical queries, such as aggregations on usage data, are less likely to benefit from cached pages, resulting in increased disk I/O and slower performance. Given this dynamic, relying solely on PostgreSQL’s buffer cache to optimize both OLTP and OLAP workloads would have been inefficient, reinforcing our decision to offload analytical queries to DuckDB. By decoupling these workloads, we ensured that transactional operations in PostgreSQL remain fast while analytical workloads benefit from DuckDB’s optimized in-memory columnar engine.</p><p>Materialized views provide precomputed query results and might seem like a fit for aggregating our usage data. However, refreshing MVs frequently (e.g., every minute for usage data) imposes significant write overhead on the database. Even with REFRESH CONCURRENTLY, the performance cost grows as data scales. Managing MVs for our multi-tenant architecture, with differing refresh cadences for namespaces, applications, and usage data, would have added operational burden.</p><h3>Why Not Materialized Views?</h3><p>Materialized views in PostgreSQL were an option we considered for caching precomputed results. However we had to address the following variables:</p><ol><li>Analytical Queries: Our queries involve dynamic aggregations, joins and filters on frequently changing usage data, which are cumbersome to maintain with materialized views. Our team prefers working with imperative languages for cache maintenance logic, thus maintaining the views in PostgreSQL was not ideal.</li><li>Infrastructure Overhead: Refreshing materialized views for frequently updated data (e.g., usage metrics) every minute would increase PostgreSQL’s load rather than alleviate it. PostgreSQL read replicas would add more complexity and infrastructure overhead without obvious performance benefits.</li><li>Limited Flexibility: PostgreSQL materialized views speed up complex queries but require manual refreshes, lacking incremental updates for frequent changes.</li></ol><p>The ideal solution for us would require no additional infrastructure (replicas, database cores, storage) at the current size of the workload while allowing us to tightly control the cache maintenance logic in Python — the language we use in our Control Plane.</p><h3>Our Solution: DuckDB as a OLAP Cache with PostgreSQL Extension</h3><p>DuckDB, a lightweight, in-process SQL analytics engine, provided the perfect middle ground between raw PostgreSQL queries and materialized views. Here’s why:</p><ul><li>High Performance for Analytical Workloads: DuckDB is automatically optimized for analytical and columnar processing, offering built-in performance gains for our use case.</li><li>Simple Integration with Python: Its seamless embedded Python API made it easy to implement into our existing control logic without additional infrastructure.</li><li>Dynamic Caching: We cache infrequently changing data (e.g., users, tenants) every 24 hours and refresh frequently changing data (e.g., usage metrics) every minute. DuckDB makes this easy to manage with minimal code.</li><li><a href="https://duckdb.org/docs/extensions/postgres.html">PostgreSQL Extension</a>: DuckDB’s native extension lets us execute PostgreSQL queries to fetch data within the DuckDB runtime</li></ul><p>DuckDB’s in-process instantiation made this insanely easy to implement in the control plane application…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qyloqlETWyWF_IDmTVTVOQ.png" /><figcaption>Instantiating DuckDB In-Memory</figcaption></figure><h3>Implementation Overview</h3><p><strong>Data Refresh Pipeline:</strong></p><ul><li>Daily Refresh: Less frequently updated metadata loaded into DuckDB every 24 hours.</li><li>Minute-Level Refresh: Frequently queried usage metrics are updated every minute.</li></ul><p><strong>Query Execution:</strong></p><ul><li>Operational tasks and alerts query the DuckDB cache for aggregated results.</li><li>Async cloud operations work with fresh, fast data.</li><li>PostgreSQL remains the source of truth, used only for updates and less frequent transactional queries.</li></ul><p>The architecture ensures that DuckDB serves as a high-speed cache for read-heavy operations, while PostgreSQL is offloaded from expensive analytical workloads.</p><h3>Performance Benchmarks</h3><p>Our performance benchmarks highlight the substantial improvements gained by integrating DuckDB into our architecture. A Striim Controller instance operates on 4 vCPUs and 7 GB of RAM, emphasizing efficiency in constrained environments. Below are the results from the latest test runs:</p><h4>Results with DuckDB Caching:</h4><ul><li>Throughput of jobs: Improved from 3.95 to 11.71 tasks/sec (cached + PostgreSQL replication) and up to 11.71 tasks/sec (full analytical query caching).</li><li>Average Latency: Consistent at 0.19–0.2 seconds per task.</li><li>Memory Usage: Stabilized at ~141 MB (cached namespace scenario) and ~120 MB (full analytical query caching).</li><li>Execution Time: Reduced to as low as .8 seconds per job.</li></ul><p>To ensure the accuracy and consistency of our benchmarks, we conducted multiple runs for each configuration — No Caching, Caching data with <a href="https://www.sqlalchemy.org/">SQLAlchemy</a> into native python data structures, and Caching with DuckDB — with explicit cache warming captured by mocking multiple runs from cold to hot cache scenarios. By allowing the cache to warm up, we ensured that frequently accessed data was preloaded, highlighting the true impact of caching mechanisms on throughput, execution time, and memory stabilization under high-concurrency workloads. This approach provided a clear view of how caching progressively improves performance in real-world scenarios and DuckDB provides built-in high performance analytical queries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GpY_NJlbxZXggi9DpH9tQg.png" /></figure><p>Key Takeaways:</p><ol><li>5–10x Execution Time Reduction: Analytical workloads experienced dramatic speed-ups without impacting transactional performance.</li><li>High-Throughput Performance: Throughput improved significantly for tasks, maintaining low latency.</li><li>Zero Additional Infrastructure Costs: DuckDB runs in-process, avoiding the need for more servers or storage.</li><li>DuckDB-based caching with PostgreSQL extension was faster than native python solution</li></ol><p>This setup is designed for the price-performance balance that makes our Striim Developer offering scalable while remaining cost-effective. While scaling CPU and RAM might have solved the problem, this approach aligns with our mission to deliver generous free-tier usage without compromising on performance.</p><h3>Memory management</h3><p>While performance improved by 5–10x, we need to account for the increased memory usage and how that may scale over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2aK-cKyF_uaJA3-6hxpXOw.png" /><figcaption>Memory Management &amp; Cache Eviction Strategy</figcaption></figure><p>We will monitor and log our cache hit rate over time while managing a simple heuristic based memory management process. Rather than using fixed memory limits, we designed a percentage-based approach where the cache can use up to 75% of system RAM total, with individual caches limited to 25%. This provides flexibility across different deployment environments while preventing memory exhaustion. We designed an LRU (Least Recently Used) eviction strategy that automatically removes older entries when memory limits are approached, along with a fallback mechanism to persist data to disk if needed. The cache monitors system memory usage and can trigger eviction or disk fallback (DuckDB PG extension queries) automatically.</p><h3>Why DuckDB Cache is Superior</h3><p>Compared to materialized views or other caching alternatives (e.g., Redis, Native Python Data Structures), DuckDB offers:</p><p><strong>Performance Gains Without Complexity:</strong></p><ul><li>No additional servers, clusters, or infrastructure were required.</li><li>No need to change or provision additional components in PostgreSQL.</li><li>All cache maintenance logic implemented in python</li></ul><p><strong>Flexibility and Simplicity:</strong></p><ul><li>Easy to define and refresh datasets based on different refresh cadences (e.g., 24 hours for static data, 1 minute for dynamic data).</li><li>Dynamic and on-the-fly SQL queries supported without materialized view limitations.</li><li>SQL interface for aggregations and analytical queries</li></ul><p><strong>Cost-Effective Scaling:</strong></p><ul><li>DuckDB runs within the existing Python application with optimized query execution and memory management, avoiding the need for external caching systems or compute resources at the size of the current workload.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkd1CHwAR5kIVYZS-TZJqg.png" /></figure><h3>So… is this HTAP?</h3><p>While this approach leverages DuckDB’s fast analytical performance and offers many benefits that you would get from an HTAP system, it doesn’t qualify as full HTAP in my mind. HTAP systems unify OLTP and OLAP workloads within a single platform, providing real-time analytics on live transactional data, an example being <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/inmem/in-memory-column-store-architecture.html#GUID-EEA265EE-8FBA-4457-8C3F-315B9EEA2224">Oracle’s embedded column store</a>. In our case, PostgreSQL handles transactions, while DuckDB serves as a pluggable, in-memory column store for read-heavy analytical queries. DuckDB PostgreSQL Extension and our controller logic glues OLTP and OLAP together by copying the data. This separation allows us to periodically refresh cached data without adding complexity or infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JxtR8iz7dFMVNtdXgkNIhw.png" /></figure><p><a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/inmem/in-memory-column-store-architecture.html#GUID-93893C03-EEBD-46E5-8C08-7E120EB643A6">Source: Oracle</a></p><p>Hybrid transactional/analytical processing (HTAP) architectures integrate OLTP (transactional) and OLAP (analytical) workloads in a single system, eliminating the need for ETL pipelines, reducing data duplication, and offering real-time consistency. Oracle’s In-Memory Column Store is a sophisticated example of HTAP, maintaining dual-format storage — data resides simultaneously in a row format (optimized for OLTP) in the buffer cache and in a columnar format (optimized for OLAP) in memory. Oracle ensures transactional consistency by synchronizing updates between the row and column formats using metadata and transaction journals. This allows analytic and transactional queries to run on the same dataset seamlessly, without duplication or delays.</p><p>Our DuckDB PostgreSQL extension approach, while not HTAP, delivers basic hybrid OLAP functionality by enabling analytical queries to run in a high-performance columnar format, separate from the OLTP workload in PostgreSQL. Unlike Oracle’s dual-format architecture, this solution doesn’t maintain real-time consistency or simultaneous access to row and columnar data. However, it provides us with a lightweight, pluggable option for analytical workloads with minimal setup. Given these are analytical operational queries, we can live without transactional consistency. DuckDB’s columnar processing and in-memory execution make it ideal for scenarios where transactional workloads can tolerate slightly delayed analytics without requiring a full HTAP system.</p><p><strong>DuckDB works great as a modular, lightweight columnar engine that complements any database, delivering OLAP-like performance without needing a full HTAP database.</strong></p><h3>Scaling Considerations</h3><p>While our DuckDB caching layer delivers excellent performance for individual clusters, you might wonder how we’ll scale as Striim Developer adoption grows. The answer lies in horizontal partitioning — we’ll distribute users across multiple independent Striim clusters, each with its own PostgreSQL database and controller instance running our DuckDB cache.</p><p>We leverage <a href="https://www.striim.com/docs/en/managing-deployment-groups.html">Striim Deployment Groups</a> (DG) to create separation between logical and physical resources. A Deployment Group represents some unit of compute that a Striim pipeline can be deployed to on one or multiple nodes. That unit can be a single server, a shared pool, or a dedicated multi-node cluster of EC2 instances in AWS. Each user has an assigned DG that maps to some physical resource. The physical resources can be scaled up vertically or horizontally, but the DG’s association to these resources remains the same. When a Striim app is deployed to a DG, it will take whatever compute is associated with it.</p><p>A global routing layer using consistent hashing will direct users to their assigned cluster based on their tenant ID, with the ability to dynamically add new clusters as needed. This approach is particularly clean because Striim Developer users operate independently, meaning there’s no cross-user data sharing or multi-tenant querying that would complicate the architecture. The beauty of this design is that our DuckDB caching layer requires no modifications — it continues to work as designed within each cluster’s scope, while we achieve horizontal scale through simple user partitioning.</p><h3>Conclusion</h3><p>By adopting DuckDB as a caching layer for our PostgreSQL database, we achieved a substantial improvement in performance while simplifying our architecture. This approach highlights the power of embedding lightweight, high-performance solutions like DuckDB into existing systems. For anyone dealing with analytical workloads on operational data, DuckDB offers an elegant, cost-effective alternative to materialized views or external caching systems.</p><p>The best part of this? It was easy to implement thanks to DuckDB’s simplicity. Zero infrastructure changes. Zero additional spend. Just some well-written Python and DuckDB PostgreSQL Extension.</p><p>These types of performance improvements allow us to provide <a href="https://signup-developer.striim.com/">Striim Developer</a> as a free, serverless experience for data engineers to explore Striim’s data movement and stream processing capabilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98b8387b8568" width="1" height="1" alt=""><hr><p><a href="https://medium.com/striim/beyond-materialized-views-using-duckdb-for-in-process-columnar-caching-98b8387b8568">Beyond Materialized Views: Using DuckDB for In-Process Columnar Caching</a> was originally published in <a href="https://medium.com/striim">Striim</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Change Data Capture Works: Understanding the Impact on Databases]]></title>
            <link>https://medium.com/striim/how-change-data-capture-works-understanding-the-impact-on-databases-346f83e64693?source=rss-470a20bc2afb------2</link>
            <guid isPermaLink="false">https://medium.com/p/346f83e64693</guid>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[data-streaming]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[John Kutay]]></dc:creator>
            <pubDate>Sat, 11 May 2024 06:52:28 GMT</pubDate>
            <atom:updated>2025-07-23T06:58:31.884Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bFtr0MytXcpSEm0d" /></figure><p>Change Data Capture (CDC) is a process that extracts database transactional data in real-time. Data Engineers and Analytics Engineers adopt CDC platforms like Striim, Oracle GoldenGate, Debezium, IBM Infosphere or Qlik Replicate to replicate operational data from Databases to event busses — like Kafka, PubSub and EventHubs — or Data Warehouses such as BigQuery, Databricks, Snowflake, Fabric and others. Change Data Capture enables businesses to process real-time data without impacting production operational systems, which is crucial for event-driven architectures and analytics. This post examines the impact of CDC on Operational Databases from minimal to significant levels, analyzing techniques such as redo log mining to the maintenance of shadow tables.</p><p>Based on some in-person discussions I had in the data community, I observed there’s a perception that Change Data Capture is viewed exclusively as a requirement for real-time analytics.</p><p>While CDC certainly enables real-time analytics if downstream consumers are not a bottleneck, the main value proposition of Change Data Capture is providing the most performant, least impactful way of replicating data from an operational database, regardless of the downstream latency requirements for analytics.</p><p>In a practical sense for data engineers, the beginning of a database replication project should not alarm DBAs and software engineers with potentially disruptive requests like polling the production database or adding triggers. Instead, data engineers need to present themselves as knowledgeable, considerate of potential concerns, and proactive in their collaboration to ensure efficient replication.</p><h4>Why we care about database performance</h4><p>Databases are critical for both business operations and customer-facing applications, where performance directly influences user experience, operational efficiency, and ultimately, business outcomes. High-performance databases ensure that applications run smoothly, data retrieval is swift, and transactions are processed quickly, which is vital for maintaining customer satisfaction and competitive advantage. For instance, in e-commerce, faster database responses can lead to quicker page loads and transaction processing, directly affecting sales conversions and customer retention. This is why we don’t want internal analytics workloads competing for database resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9jHbIiL26XAnCOo8" /></figure><p>Implementing Change Data Capture using direct queries or maintaining shadow tables, can significantly influence the management of the database’s cache, particularly the Least Recently Used (LRU) cache objects. The database query cache is designed to keep frequently accessed data in memory, optimizing the performance for repetitive queries. However, the operations involved in CDC like frequent querying or updating shadow tables can disrupt this optimization.</p><p>These CDC methods might populate the cache with data that is less frequently accessed by operational applications, potentially evicting more critical data from the cache and degrading overall application performance. This scenario underscores why minimal impact CDC methods, such as log mining, are often preferable from a performance optimization perspective. These methods are less likely to interfere with the normal operation of the database’s query cache, maintaining a better balance between data capture and operational efficiency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8M95FA8RCoF8opLP" /></figure><p>Long story short, we want the database to be tuned for application purposes, not for the convenience of internal analytics workloads.</p><h4>Varying Degrees of Impact on Databases</h4><p>I ran a poll on both LinkedIn and Twitter to gauge the data community’s assumptions about the impact of Log-Based Change Data Capture, and the results were polarizing to say the least!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/0*VNEK30P5QFjVF7RX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4s_K5t1oE2cuUL6j" /></figure><p>To answer my respective polls on Twitter and Linkedin, the correct answer is YES. There’s always memory overhead of performing Change Data Capture on an operational Database. However, impact can vary from minimal — such as the memory for a thread to tail a disk on-file to extreme — such as periodically running queries on your database. That can be the difference between some minor memory tuning to your database to support Change Data Capture versus doubling the size and cost of your database to support batch queries.</p><p>To help visualize this, I created a matrix of performance impact from various methods of Change Data Capture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sk9fc-3Bvq8Cyi7B" /></figure><p>Here we show how Striim performs Change Data Capture from Oracle. You can see some of the memory usage on the database is ‘house money’ so to speak: Oracle’s Program Global Area will actually maintain a redo log buffer regardless of external Change Data Capture consumers for downstream analytics. Striim will simply subscribe to the changes published in the online redo log, and buffer them in-memory and on-disk. We’ve added extensive work to support long running transactions off-heap in Striim’s system layer, which also offloads processing from the operational database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bFtr0MytXcpSEm0d" /></figure><h4>Minimal Impact: Redo or Write Ahead Log Mining</h4><p>At the minimal end of the spectrum is log mining. Database systems like Oracle use the redo log files for log mining, which is a relatively low-impact method of implementing CDC. The Oracle database maintains a redo log to record all changes made to the database. This log is essential for data recovery and is also used in log mining to track changes.</p><p>The actual memory impact here is primarily on the Shared Global Area (SGA) in Oracle. The SGA is a memory region that contains data and control information for a server process. It is used to process SQL statements and to manage the data as it moves through the system. In the context of CDC, when Oracle’s log mining feature (LogMiner) is used, it reads from the redo logs and uses the SGA to store the session’s private SQL area for processing the mined data. <a href="https://forums.oracle.com/ords/apexds/post/ora-04030-during-logminer-2004">Oracle’s native logmining can cause out of memory errors</a>.</p><p>The SGA size can vary based on the workload and the specific configuration of the Oracle instance. However, since log mining processes only read the redo logs and do not require maintaining a separate physical structure for the changes, the memory overhead is relatively controlled. The key to minimizing impact in such configurations is to ensure that SGA memory is sized adequately to handle the peak workload without causing significant performance degradation.</p><p>Oracle also supports Archive Logs, which can serve as a backup of the redo log for long term storage and recovery purposes. You can also mine data from the Archive Logs with minimal impact, given the work of generating the redo log was already done by the database, and you’re just spinning some threads to tail a file from the database’s operating system.</p><h4>Low Impact: Binary Log CDC in MySQL and Logical Replication in PostgreSQL</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C0ubXCbax4E8bhPV.png" /><figcaption>MySQL BinLog</figcaption></figure><p>MySQL’s binary log-based CDC is a low impact method to extract changes from a database. MySQL’s binary log records all changes to the database, both data and structure, as a series of events. This method is similar to Oracle’s log mining but includes some operational differences that may influence memory usage.</p><p>The binary log itself is a file-based log, not directly impacting the database’s memory under typical operations. However, reading these logs for CDC purposes, especially when using external tools or custom scripts, can increase memory usage depending on how the changes are processed and staged before they are consumed or replicated.</p><p>PostgreSQL’s logical replication offers a balance between performance impact and real-time data synchronization capabilities. Logical replication in PostgreSQL involves streaming changes at the logical level, rather than copying physical data blocks, allowing for more selective replication and lower overhead compared to physical replication methods. This method captures changes to the database schema and data in the form of logical change records, which are then transmitted to subscriber databases.</p><p>The impact on memory and overall database performance with logical replication is generally low-to-moderate. Unlike methods that require frequent direct queries or the maintenance of shadow tables, logical replication leverages a publish-subscribe model, which minimizes the disruption to the main database operations. This approach allows PostgreSQL to maintain high performance by not overly taxing the database’s cache or CPU resources, making it particularly suitable for applications that require real-time or near-real-time data updates without a significant performance trade-off. Logical replication is highly configurable and can be tuned to replicate entire databases, specific tables, or even specific rows, offering flexibility that is valuable for maintaining efficient database operations and ensuring data consistency across distributed systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WDcbi2AGlIRBtkRF.png" /><figcaption>PostgreSQL Write-Ahead Logic with Logical Replication</figcaption></figure><p>Mining the PostgreSQL Write-Ahead Log (WAL) can be an intensive operation, especially when done frequently or on large databases. Here are some of the disk-related issues that can occur from this process:</p><p>Increased Disk I/O: The WAL records every change made to the database, so mining it means reading through these records. This can lead to increased disk I/O, which might strain the storage system, especially if it’s not equipped with high-performance drives like SSDs.</p><p>Disk Space Consumption: The WAL can grow significantly in size, especially in a busy database system with lots of transactions. If the WAL files are not managed properly (e.g., archived or cleaned up regularly), they can consume a substantial amount of disk space, potentially filling up the disk.</p><p>Performance Degradation: As the disk begins to fill up, or as I/O operations increase, you might notice a degradation in overall system performance. This can affect not just database operations but other applications that rely on the same disk resources.</p><p>Fragmentation: Over time, continuous writing and deleting of WAL files can lead to disk fragmentation. This can degrade the performance of the disk as it requires more time to read scattered pieces of data.</p><p>Risk of Data Loss: In extreme cases, such as when the disk is full or nearly full, new transactions might fail or the system might not be able to write new WAL entries. This could lead to transaction failures or, in worst cases, data corruption if the system behaves unexpectedly due to disk space issues.</p><p>To mitigate these issues, it’s important to:</p><ul><li>Regularly monitor disk space and I/O metrics.</li><li>Implement proper WAL archiving and cleanup strategies.</li><li>Use high-performance disks for databases that require intensive I/O operations.</li><li>Consider scaling out your storage or using a dedicated storage system for WAL files to isolate the impact from other operations.</li></ul><h4>Moderate Impact: Maintaining Shadow Tables and Change Stream Implementations</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*qM9PuUKY0qPdKEqa.png" /><figcaption>SQLServer Change Data Capture with Shadow Tables</figcaption></figure><p>On the more significant end of the spectrum is the use of shadow tables for CDC, such as implemented by SQL Server’s Change Data Capture feature. This method involves creating and maintaining additional tables (shadow tables) that mirror the structure of the monitored tables and hold all changes made to the data. Each insert, update, or delete operation on the target table is reflected in the shadow table, capturing the old and new values of the affected rows.</p><p>This approach has a more pronounced impact on memory usage for several reasons:</p><ol><li>Increased Storage Requirements: Shadow tables increase the storage requirement as they duplicate a significant amount of data.</li><li>Increased I/O Operations: Manipulating shadow tables requires additional read and write operations, which can lead to increased memory usage as data pages are loaded into and evicted from the cache.</li><li>Overhead of Trigger-Based Tracking: In some implementations, triggers are used to populate shadow tables. Triggers themselves consume memory and CPU resources, further adding to the overhead.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KnmZ-CmfLtMqdf-Q.png" /></figure><p>MongoDB Change Streams is another Change Data Capture (CDC) implementation that generally has a minimal to moderate impact on database performance, depending on the scale and configuration of the deployment. Change Streams allow applications to access real-time data changes without the complexity of tailing the oplog (operations log) directly. They provide a more streamlined and scalable approach to reacting to database changes, making them particularly useful for applications that need to trigger actions or update external systems in response to data modifications within MongoDB.</p><p><strong>Performance Impact of MongoDB Change Streams</strong></p><ul><li>Moderate Overhead: Change Streams utilize MongoDB’s built-in replication capabilities. They operate by listening to changes in the oplog, a special capped collection that logs all operations that modify the data stored in databases. Since the oplog is already an integral part of MongoDB’s replication infrastructure, tapping into this system adds only little overhead. However, the oplog listener does consume resources from the database.</li><li>Scalability: MongoDB’s horizontal scalability through sharding means that Change Streams can also scale by distributing the load across multiple servers. This scalability helps in maintaining performance even as the volume of changes increases.</li><li>Selective Listening: One of the key features of Change Streams is their ability to filter and only listen to specific changes, which can significantly reduce the amount of data that needs to be processed and transmitted. This selective approach minimizes the memory and network bandwidth used, thereby mitigating the impact on the overall database performance.</li></ul><p><strong>Optimizing Performance with Change Streams</strong></p><p>To optimize the performance when using MongoDB Change Streams, it’s crucial to:</p><ul><li>Filter Changes: Apply filters to only subscribe to the relevant changes needed by the application, reducing unnecessary data processing.</li><li>Monitor Load: Keep an eye on the replication window and the impact of Change Streams on the primary database operations, especially in high-throughput environments.</li><li>Adjust Oplog Size: Ensure the oplog is appropriately sized to handle the volume of changes without frequent rollovers, which could lead to missed changes or higher latency in Change Streams.</li></ul><h4>Highest Impact: Periodic Batch Jobs with Query-Based CDC</h4><p>The highest memory impact in CDC operations often occurs when CDC is implemented through periodic queries against the database. This approach involves running full or incremental queries at regular intervals to detect changes in the data. This method can be highly resource-intensive, particularly for large databases or databases with high transaction volumes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9jHbIiL26XAnCOo8" /></figure><p>The main challenges with batch query-based CDC include:</p><ul><li>High Resource Utilization: Running complex queries to detect changes can consume significant CPU and memory resources, as these queries often involve scanning large portions of tables or joining multiple tables.</li><li>Impact on Database Performance: Frequent and resource-intensive queries can degrade the performance of the primary database operations, potentially leading to slower response times for other applications using the same database.</li><li>Data Freshness Issues: Since this method captures changes at intervals, there is a latency in data capture, which may not be suitable for scenarios requiring real-time or near-real-time data syncing.</li></ul><h4>How we designed Striim</h4><p>Change Data Capture is a powerful technique for enabling real-time data processing and synchronization. The choice of CDC method should consider not only the operational requirements but also the impact on database performance, especially memory usage. From minimal impact techniques like Oracle’s log mining to more intensive methods like SQL Server’s shadow tables, and the highest impact method of periodic query-based CDC, each approach has its trade-offs that need to be managed to maintain overall system efficiency and performance.</p><p>At Striim, we’ve optimized CDC to offer both high performance and ease-of-use, supporting log-based CDC and CDC from change tracking tables, thus simplifying data movement and reducing total cost of ownership as highlighted by our <a href="https://www.striim.com/case-study/how-american-airlines-powers-global-techops-with-a-real-time-data-hub/">clients like American Airlines: “Striim is a fully managed service that reduces our total cost of ownership while providing a simple drag and drop UI. There’s no maintenance overhead for American Airlines to maintain the infrastructure.”</a></p><p>By optimizing Change Data Capture for low impact data capture and low latency delivery to consumers, <a href="https://www.striim.com/case-study/ups/">enterprises like UPS are able to build real-time AI applications to battle porch pirates</a>.</p><p>You can learn more about Striim’s leading performance in Change Data Capture here with our respective partner endorse blogs:</p><p><a href="https://cloud.google.com/blog/products/data-analytics/data-integration-from-oracle-to-google-bigquery-using-striim/">Striim Oracle to BigQuery Benchmark</a></p><p><a href="https://medium.com/snowflake/optimizing-continuous-data-pipelines-for-low-latency-using-snowpipe-streaming-api-in-striim-507a7798b0fc">Striim Oracle to Snowflake Benchmark</a></p><p>If you want to start developing real-time, low impact Change Data Capture pipelines you can try <a href="https://go2.striim.com/aws-trial">Striim’s free trial </a>and <a href="https://signup-developer.striim.com/">free community version.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=346f83e64693" width="1" height="1" alt=""><hr><p><a href="https://medium.com/striim/how-change-data-capture-works-understanding-the-impact-on-databases-346f83e64693">How Change Data Capture Works: Understanding the Impact on Databases</a> was originally published in <a href="https://medium.com/striim">Striim</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>