r/AskComputerScience • • Dec 06 '19

ELI5: What makes SQL faster than just reading through a CSV file using a language like Python or Java?

42 Upvotes

18 comments sorted by

View all comments

Show parent comments

5

u/WardenUnleashed Dec 06 '19

Dont forget about the caching aspects as well!

If you’ve already asked me to find all the people with red shirts and blue eyes and I know no one has walked in or out of the room(or changed shirts), I don’t have to figure it out again because I already know the answer!

1

u/SS7Junkie Dec 06 '19

Oh that’s a good addition. This turned in to a fun analogy I’ll use again.