<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3" -->

---
title: Detecting Full Table Scans With SQLite | daily.dev
description: SQLite exposes statement statistics via an API that includes a `fullscan_steps` counter, making it possible to detect full table scans after query execution...
canonical: https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Detecting Full Table Scans With SQLite | daily.dev
og:description: SQLite exposes statement statistics via an API that includes a `fullscan_steps` counter, making it possible to detect full table scans after query execution...
og:url: https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3
og:image: https://api.daily.dev/og/posts/jzauwPaC3.png
og:image:alt: Detecting Full Table Scans With SQLite
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.

# Detecting Full Table Scans With SQLite

**[Tenderlove Making](https://daily.dev/sources/tenderlove)** · 2 min read · 0 upvotes · 0 comments

## Summary

SQLite exposes statement statistics via an API that includes a `fullscan_steps` counter, making it possible to detect full table scans after query execution without using EXPLAIN. A Ruby code example demonstrates preparing a statement, checking `stmt.stat(:fullscan_steps)` to confirm a full table scan occurred, then adding an index and verifying the scan no longer happens. The author suggests this could be integrated into Rails to automatically warn or raise errors during test/development when full table scans are detected.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://tenderlovemaking.com/2026/07/15/detecting-full-table-scans-with-sqlite>

## Similar posts on daily.dev

- [Finding the Slow Query Killing Your Rails App](https://daily.dev/posts/finding-the-slow-query-killing-your-rails-app-49xhuplt1) · AppSignal · 0 upvotes · 0 comments
- [Different Approaches to Debugging Query Performance in Rails](https://daily.dev/posts/different-approaches-to-debugging-query-performance-in-rails-ggtbxh5sv) · Saeloun · 4 upvotes · 0 comments
- [How SQLite Is Tested](https://daily.dev/posts/how-sqlite-is-tested-9z7tyf3sg) · Hacker News · 2 upvotes · 0 comments
- [pg\_stat\_statements: everything it tells you](https://daily.dev/posts/pg-stat-statements-everything-it-tells-you-tihzbjd0h) · Planet PostgreSQL · 0 upvotes · 0 comments

---

Tags: [#ruby](https://daily.dev/tags/ruby), [#rails](https://daily.dev/tags/rails), [#sqlite](https://daily.dev/tags/sqlite)

[View this post on daily.dev](https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3)

```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":"Detecting Full Table Scans With SQLite","url":"https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3"},"datePublished":"2026-07-15T15:44:40.692Z","dateModified":"2026-07-15T16:07:30.291Z","description":"SQLite exposes statement statistics via an API that includes a `fullscan_steps` counter, making it possible to detect full table scans after query execution...","image":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","thumbnailUrl":"https://media.daily.dev/image/upload/s--CxzD6vbw--/f_auto/v1722860399/public/Placeholder%2005","isAccessibleForFree":true,"articleSection":"Tenderlove Making","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":"Tenderlove Making","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/87e9008633884d539ab3b48a87c53613","url":"https://daily.dev/sources/tenderlove"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/detecting-full-table-scans-with-sqlite-jzauwpac3","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ruby,rails,sqlite","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Tenderlove Making","item":"https://daily.dev/sources/tenderlove"},{"@type":"ListItem","position":3,"name":"Detecting Full Table Scans With SQLite"}]}
```

