Go straight to the answers
Vega SEO Talks

What crawl data warehousing schema design efficiently stores and queries crawl snapshots, diff analysis, and page-level change history across millions of URLs over multi-year timespans?

Answered 3-minute answer rooted in 2 pages

Use an append-only fact table with one row per URL per crawl, partitioned by crawl date and clustered by URL or site section; a slowly changing dimension that records each version of the attributes you care about with valid-from and valid-to dates; and a diff table computed after each crawl. These are general data warehousing patterns, not an SEO standard. Partitioning is what keeps multi-year scans affordable; as Google Cloud’s BigQuery documentation puts it, “By dividing a large table into smaller partitions, you can improve query performance and control costs by reducing the number of bytes that a query reads.” Clustering does the same within partitions for queries that filter by URL.

The tables

Table Grain Key columns Purpose
Crawl runs One row per crawl Crawl ID, start time, crawler version, configuration Fair comparisons between runs
Page snapshots One row per URL per crawl Crawl date, crawl ID, URL ID, status, canonical, robots, title, main heading, word count, links in and out Full history; partition by crawl date, cluster by URL ID
Page versions One row per attribute version URL ID, valid from, valid to, title, canonical, status "What was this page on date X" in one lookup
Page diffs One row per changed field per URL per crawl Crawl ID, URL ID, field, old value, new value Fast "what changed" queries and alerts
URLs One row per URL URL ID, URL, template, section Stable keys and grouping

Sources: Google Cloud’s partitioned tables and clustered tables documentation, which says clustering lets queries that filter on clustered columns “scan only the relevant blocks, not the entire table or partition.”

Design rules

  1. Append, never overwrite. A “current state” table that replaces rows destroys the history the warehouse exists for.
  2. Surrogate URL keys. Map long URLs to integer IDs once; join on IDs.
  3. Partition by crawl date from the start. Repartitioning years of data later is costly.
  4. Version only what you query. Title, canonical, status and indexability first; add fields when a real question needs them.
  5. Store configuration per run, so differences caused by the crawler can be filtered out.
  6. Compute diffs after each crawl for the comparisons people use daily; use window functions over the snapshot table for ad hoc ranges.

Joining search data

Load Search Console bulk exports into the same warehouse, keyed by URL and date, so changes in the diff table can be compared with clicks and impressions for the same pages.

Scale checks

Before rollout, load a realistic volume, millions of URLs and many crawls, and time the queries you will actually run: one URL’s history, one section over a quarter, last crawl’s changes. A design that works on a sample can fail at full size.

A worked example

For example, imagine a retailer tracking two million product URLs weekly for five years. With the snapshot table partitioned by crawl date and clustered by URL ID, a versions table for titles and canonicals, and diffs written after each crawl, “every title change in the last 90 days” reads only recent partitions of one table, and “what did this page’s title say in March last year” is a single lookup.

An append-only, date-partitioned snapshot table with clustered URL keys, a versioned attribute dimension and a per-crawl diff table stores multi-year crawl history efficiently, because each routine question reads only the partitions and blocks it needs.

Answers that share these roots

  1. What query cost and performance failures occur when BigQuery SEO datasets grow beyond terabyte scale without proper partitioning, clustering, and materialized view strategies? shares 2 pages
  2. How should enterprise SEO teams architect a log file analysis pipeline that processes billions of monthly requests without exceeding infrastructure budgets? shares 2 pages
  3. What BigQuery data pipeline architecture efficiently joins GA4, Google Search Console, crawl data, and ranking data into a unified SEO analysis dataset? shares 1 page

Replies to this answer

Leave a Reply

Your email address will not be published. Required fields are marked *