Skip to content

Cloud Spanner

Location Instance Databases Tables
attracs-services-195009 attracs-spanner-01 Location

location_dev

location_nightly

Cloud Spanner is a horizontally scaling fully-managed database. We use it to as a database for Vehco Data Service & Vehco Data Service Nightly * HAProxy in frontend VM's will replicate data from prod to nightly

Table content

  • location_latest - latest position per object
  • location -full history

Spanner Studio

Few examples of simple selects:

SELECT object_id, timestamp, lat, lon  FROM location_latest WHERE object_id = 'c07eb566-8923-434f-a0a2-4d351e9a20d8' AND org_uuid = 'cbe0b5d2-2e56-4e08-af72-4938b036de8f';
SELECT app_uuid, MAX(timestamp) AS last_write, COUNT(*) AS n FROM location WHERE org_uuid = 'cbe0b5d2-2e56-4e08-af72-4938b036de8f' AND timestamp > TIMESTAMP '2026-05-01T00:00:00Z' GROUP BY app_uuid ORDER BY last_write DESC;