---
answer: direct
beat: system-design
source: 1 article · updated: August 2, 2026
---

Why does a naive database query like LIKE 'car%' get slower as the dictionary grows?

The query must scan every row or index entry, comparing the prefix against each one. That's O(N) per keystroke, where N is the full dictionary. A trie answers the same question in O(p), the prefix length, because it jumps directly to the 'car' subtree.

Answered in

Tries: Why Autocomplete Doesn't Scan Every Word

A trie finds all words with a prefix in O(p) time, independent of dictionary size. Radix compression and top-k heaps make autocomplete instant.

Crashtech Editorial August 2, 2026 System Design & Architecture

Read the full analysis

Other questions this article answers

More system design & architecture questions

Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design & Architecture beat.