system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do search engines like Google search through so much data so quickly?

Honestly, this isn't from a completely ignorant perspective when it comes to programming, so feel free to go into great detail (If you'd like!) with your explanation.
gpt
Suppose you have a very thick reference book that discusses gardening, and you wanted to find every page in the book that talks about roses.  How do you do it?

Well, in the worst case, you have to go through every page in the book, read it, and see if it talks about roses.  But in the best case, the book has an index in the back, which makes it easy; you find "rose" in the index, and it tells you which of the pages in the book talk about roses.

How did the book's index get made?  Well, some people went through every page in the whole book and wrote down what topics are mentioned in which page.  They might have used one index card for each topic; as they went through the book, when they found a page that talks about roses, they took the index card for "rose" and added that page number to it.  Then at the end they wrote down the contents from all of the cards at the end of the book, and that's the index.

So making an index is slow and takes a lot of work, but after that's done, using the index is easy and fast.

Well, Google works basically just like that.  Google has two parts: the "crawlers" or "robots" that visit all of the pages in the Internet and make an index of all the terms and phrases that appear in the Internet, and which pages each of them appears in.  Then there's the search page that you see and use, which looks up your search terms in the index.  The robots's work is slow and hard, but you don't normally see it unless you have an unpopular website that you update frequently—in which case you notice that it may take a day or a few before Google notices the changes to your website (it hasn't incorporated your latest changes into the index).