---
title: "Stop Adding Indexes. Do This Instead"
url: https://daily.dev/posts/stop-adding-indexes-do-this-instead-v9tgza8m9
source_url: https://www.youtube.com/watch?v=vqq1JMqwm5w
type: video:youtube
source: "Database Star"
published: 2026-05-31T07:44:14.182Z
updated: 2026-05-31T07:56:35.516Z
tags: ["backend", "sql"]
reading_time: 4
upvotes: 0
comments: 0
language: 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.

# Stop Adding Indexes. Do This Instead

**[Database Star](https://daily.dev/sources/database-star)** · 4 min read · 0 upvotes · 0 comments

## Summary

Adding indexes blindly to fix slow SQL queries is a common but flawed approach. Using functions on indexed columns (like wrapping a date column in YEAR()) prevents the database from using those indexes efficiently, forcing full table scans. The fix is often to rewrite the query logic — for example, replacing a function-based date filter with a range filter — so existing indexes can be used without adding new ones. Indexes should support well-written queries, not compensate for poorly written ones. Understanding what a query actually does before touching indexes is the key mindset shift.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=vqq1JMqwm5w>

## Similar posts on daily.dev

- [But I Added an Index\! Why Is My SQL Query Still Slow?](https://daily.dev/posts/but-i-added-an-index-why-is-my-sql-query-still-slow--tzn94gf7j) · Medium · 0 upvotes · 0 comments

---

Tags: [#backend](https://daily.dev/tags/backend), [#sql](https://daily.dev/tags/sql)

[View this post on daily.dev](https://daily.dev/posts/stop-adding-indexes-do-this-instead-v9tgza8m9)
