Geospatial and Time-Series Data Questions

Specialized data shapes and their stores: geospatial data types, spatial indexing, and location queries; and time-series data with high-ingest, retention, downsampling, and cardinality management. Covers storage-engine tuning such as compression, chunking, and indexing for range queries, and when purpose-built extensions or databases beat general-purpose stores for these workloads. A niche but recurring topic for location- and telemetry-heavy systems.

HardTechnical
74 practiced

Users report tail latency spikes on complex aggregation queries that scan thousands of series. Propose optimizations across schema, query rewriting, storage-engine (e.g., indices, partitions), and caching layers to improve tail latency while keeping storage cost reasonable.

MediumTechnical
105 practiced

Explain different write paths used by TSDBs: append-only with WAL, direct columnar writes, and write buffering with compaction. For each, describe impact on write latency, durability, recovery time after crash, and read performance.

MediumTechnical
92 practiced

Design a retention and compaction policy for time-series sensor data with different SLAs: raw data retained for 30 days with high-resolution, summarized data kept for 3 years. Explain how to implement rollups, partition pruning, and how to support queries that need both raw and rolled-up data.

EasyTechnical
78 practiced

Write PostgreSQL/TimescaleDB SQL to:

  1. Create a hypertable for host metrics with schema: metric_id serial PK, host text, metric_name text, metric_value double precision, ts timestamptz NOT NULL.
  2. Create a 5-minute continuous aggregate (rollup) for CPU metric per host.
  3. Show a query that returns the 5-minute avg CPU per host for the last 24 hours, sorted by highest spike.
  4. Add a retention policy to drop raw chunks older than 7 days.
    Provide correct TimescaleDB functions and explain any assumptions about chunk interval.
MediumSystem Design
81 practiced

You want to keep 7 days of raw metrics but maintain 2 years of aggregated metrics using continuous aggregates in TimescaleDB. Design an automated policy for (a) creating and refreshing continuous aggregates, (b) downsampling raw into the aggregates, and (c) removing raw chunks older than 7 days without breaking queries that request older aggregated data.

Unlock Full Question Bank

Get access to all 33 Geospatial and Time-Series Data interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.