<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9" -->

---
title: How to Query Billion+ Rows on Postgres Without the Overhead
description: A sponsored newsletter post promoting Tiger Cloud, a managed TimescaleDB service, using Cloudflare's two-year struggle with plain Postgres at billion-row scale...
canonical: https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Query Billion+ Rows on Postgres Without the Overhead | daily.dev
og:description: A sponsored newsletter post promoting Tiger Cloud, a managed TimescaleDB service, using Cloudflare's two-year struggle with plain Postgres at billion-row scale...
og:url: https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9
og:image: https://api.daily.dev/og/posts/icht0TIs9.png
og:image:alt: How to Query Billion+ Rows on Postgres Without the Overhead
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Query Billion+ Rows on Postgres Without the Overhead

**[Daily Dose of Data Science \| Avi Chawla \| Substack](https://daily.dev/sources/dailydoseofds)** · 10 min read · 4 upvotes · 0 comments

## Summary

A sponsored newsletter post promoting Tiger Cloud, a managed TimescaleDB service, using Cloudflare's two-year struggle with plain Postgres at billion-row scale as the motivating case study. It explains how hypertables provide automatic time-based partitioning, continuous aggregates replace cron-based rollup pipelines, and compression is built in from day one. A demo earthquake dashboard built with Claude Code and Tiger CLI (MCP server) illustrates the setup. The post also covers a separate NVIDIA research paper on cross-model KV cache transfer, showing a closed-form, training-free method that converts KV caches between models in the same family (e.g., Qwen3 14B to 32B) at 3–25x faster than reprocessing context, retaining 73–98% accuracy across tested pairs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.dailydoseofds.com/p/how-to-query-billion-rows-on-postgres>

## Questions this post answers

### How much faster did Cloudflare's queries get after moving from plain Postgres to TimescaleDB?

Cloudflare cut query times by up to 35x after moving from plain Postgres to TimescaleDB. Their team had spent two years manually patching Postgres with cron-based precomputed aggregates before evaluating ClickHouse, which required a full ingestion pipeline, and ultimately settling on TimescaleDB built on the Postgres they already used.

_Teams weighing a database migration for time-series scale can track real-world benchmarks like this on daily.dev._

### How do you convert a regular Postgres table into a TimescaleDB hypertable?

Converting a Postgres table to a TimescaleDB hypertable takes a single function call, after which time-based partitioning runs automatically from that point forward. Queries then only hit the chunks relevant to the filtered time window, regardless of total dataset size, removing the need to manually build and maintain day- or month-based child tables.

_Engineers evaluating TimescaleDB for partitioning follow practical setup details like this on daily.dev._

### Can a KV cache generated by one LLM be reused by a different model to skip prefill?

Yes, within the same model family: NVIDIA's method converts KV cache from a source model into the format a target model expects using a closed-form, training-free linear mapping, letting the target skip prefill entirely. Tested on Qwen3, Llama 3.1, and Ministral 3 pairs, four of six configurations retained 73-98% of standalone accuracy while running 3-25x faster than reprocessing context, though cross-family transfer and mismatched head configurations remain untested.

_Teams optimizing LLM serving costs across model swaps can follow research like this KV cache transfer work on daily.dev._

## Similar posts on daily.dev

- [You can outgrow vanilla Postgres without abandoning Postgres](https://daily.dev/posts/you-can-outgrow-vanilla-postgres-without-abandoning-postgres-inzvfgbdt) · The New Stack · 2 upvotes · 0 comments

---

Tags: [#data-science](https://daily.dev/tags/data-science), [#postgresql](https://daily.dev/tags/postgresql), [#timescaledb](https://daily.dev/tags/timescaledb)

[View this post on daily.dev](https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Query Billion+ Rows on Postgres Without the Overhead","url":"https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9"},"datePublished":"2026-08-10T13:53:33.074Z","dateModified":"2026-09-13T18:30:55.334Z","description":"A sponsored newsletter post promoting Tiger Cloud, a managed TimescaleDB service, using Cloudflare's two-year struggle with plain Postgres at billion-row scale...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/415ee06c26b34520b0f689a3d9a94ad7?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/415ee06c26b34520b0f689a3d9a94ad7?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Daily Dose of Data Science | Avi Chawla | Substack","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Daily Dose of Data Science | Avi Chawla | Substack","logo":"https://media.daily.dev/image/upload/s--4IHQgTOw--/f_auto/v1710503712/logos/dailydoseofds","url":"https://daily.dev/sources/dailydoseofds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"data-science,postgresql,timescaledb","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Daily Dose of Data Science | Avi Chawla | Substack","item":"https://daily.dev/sources/dailydoseofds"},{"@type":"ListItem","position":3,"name":"How to Query Billion+ Rows on Postgres Without the Overhead"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-query-billion-rows-on-postgres-without-the-overhead-icht0tis9#faq","mainEntity":[{"@type":"Question","name":"How much faster did Cloudflare's queries get after moving from plain Postgres to TimescaleDB?","acceptedAnswer":{"@type":"Answer","text":"Cloudflare cut query times by up to 35x after moving from plain Postgres to TimescaleDB. Their team had spent two years manually patching Postgres with cron-based precomputed aggregates before evaluating ClickHouse, which required a full ingestion pipeline, and ultimately settling on TimescaleDB built on the Postgres they already used. Teams weighing a database migration for time-series scale can track real-world benchmarks like this on daily.dev."}},{"@type":"Question","name":"How do you convert a regular Postgres table into a TimescaleDB hypertable?","acceptedAnswer":{"@type":"Answer","text":"Converting a Postgres table to a TimescaleDB hypertable takes a single function call, after which time-based partitioning runs automatically from that point forward. Queries then only hit the chunks relevant to the filtered time window, regardless of total dataset size, removing the need to manually build and maintain day- or month-based child tables. Engineers evaluating TimescaleDB for partitioning follow practical setup details like this on daily.dev."}},{"@type":"Question","name":"Can a KV cache generated by one LLM be reused by a different model to skip prefill?","acceptedAnswer":{"@type":"Answer","text":"Yes, within the same model family: NVIDIA's method converts KV cache from a source model into the format a target model expects using a closed-form, training-free linear mapping, letting the target skip prefill entirely. Tested on Qwen3, Llama 3.1, and Ministral 3 pairs, four of six configurations retained 73-98% of standalone accuracy while running 3-25x faster than reprocessing context, though cross-family transfer and mismatched head configurations remain untested. Teams optimizing LLM serving costs across model swaps can follow research like this KV cache transfer work on daily.dev."}}]}
```

