B
25

My first database query crashed my whole app in 10 seconds

I finally tried SQLite for a small project last night and accidentally ran a SELECT without a WHERE clause on a table with 2 million rows. The app froze for a whole minute before I force quit it. I felt stupid but then I realized I just learned why indexes matter. Has anyone else made a mistake like that their first time using a database?
3 comments

Log in to join the discussion

Log In
3 Comments
murphy.abby
Sort of disagree here. An index wouldn't fix a SELECT on 2 million rows unless you were selecting just the indexed column.
6
jennifer204
jennifer2041mo agoMost Upvoted
LIMIT and OFFSET could've saved you too, learned that the hard way myself.
3
blair_martin
Brought back memories of my app taking a coffee break on me.
-1