# The wonders of Google

**URL:** <https://boards.straightdope.com/t/the-wonders-of-google/135312>\
**Category:** Factual Questions\
**Created:** [November 5, 2002, 3:54am UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312 "2002-11-05T03:54:02Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![aeropl](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@aeropl](https://boards.straightdope.com/u/aeropl)\
**Post date:** [November 5, 2002, 3:54am UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/1 "2002-11-05T03:54:02Z")

</div>

You have to pay Google to ask it a question, so I’m being cheap and asking you guys.

Why does it take Google 1.3 seconds to search billions of web pages for the term “cecil”, while my brand-new 2 gighertz computer takes 5 minutes to do the same thing through my puny hard drive? I understand Google somehow indexes these webpages, but even then it’s a wonder how it does it so fast. What gives?

---

<div class="post-metadata">

**Author:** ![DarrenS](https://avatars.discourse-cdn.com/v4/letter/d/977dab/32.png) [@DarrenS](https://boards.straightdope.com/u/DarrenS)\
**Post date:** [November 5, 2002, 4:29am UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/2 "2002-11-05T04:29:25Z")

</div>

Here’s Google’s explanation of their technology:

> **[Browse All of Google's Products & Services - Google](https://about.google/products/)**
>
> Browse a list of Google products designed to help you work and play, stay organized, get answers, keep in touch, grow your business, and more.

---

<div class="post-metadata">

**Author:** ![aeropl](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@aeropl](https://boards.straightdope.com/u/aeropl)\
**Post date:** [November 5, 2002, 4:34am UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/3 "2002-11-05T04:34:14Z")

</div>

Thank you. I tried to find a page like that but all I could come up with was a page explaining how google uses a pigeon and it apparently was a joke or something. I still don’t understand how completes searches so fast, even with the thousands of pc’s connected. Thanks again though.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [November 5, 2002, 5:35am UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/4 "2002-11-05T05:35:18Z")

</div>

In short, Google is not searching billions of web pages, but their index of billions of web pages. They keep track of which pages contain which terms, and which pages link to those pages (to judge popularity associated with a given term.) They have multiple server farms with thousands of machines for searching the index.

On the other hand, when your computer is searching documents on your hard drive, it has to go through each and every document to see what’s in it. Newer operating systems have indexing features built in to speed up this sort of thing.

---

<div class="post-metadata">

**Author:** ![engineer\_comp\_geek](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/engineer_comp_geek/32/504_2.png) [@engineer\_comp\_geek](https://boards.straightdope.com/u/engineer_comp_geek)\
**Post date:** [November 5, 2002, 2:23pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/5 "2002-11-05T14:23:04Z")

</div>

It’s basically like the difference between looking something up in the index of an encyclopedia and going right to that page vs. flipping through the entire encyclopedia page by page and looking at every word.

The “index” that a computer uses is called a “search tree.” A search tree has “branches” which then end in “leaves” where the data is contained. Google searches on words, so a simple word search tree might be constructed just using each letter of the alphabet. You start off with 26 branches, one for each letter of the alphabet. Then each branch has 26 branches under it, and so forth. Branches that don’t end in any leaves (for example the ZQ branch probably doesn’t end in any words) are just eliminated from the tree structure so they don’t take up space.

In your example, this type of search tree would first go to the C branch, then the E branch under that, then the C branch under that, etc. until it got to the L and it would see if a leaf was present there. If so, it would list out everything in that leaf. If there was no leaf there it would return not found. This means that it can find the word with 5 simple comparisons, instead of doing a few million comparisons by searching the entire disk drive.

This type of search tree probably wouldn’t be all that practical for an internet search engine, but it should give you the basic idea of how they work so fast. The one thing google isn’t going to tell you is exactly what type of search tree they set up, because that is basically the technology that they do in fact sell. Their internet search engine is just a free demo of their technology.

A google search (heh) on “search tree” should give you a bit of reading material. The data structures and search algorithms can get fairly complex.

---

<div class="post-metadata">

**Author:** ![Bongmaster](https://avatars.discourse-cdn.com/v4/letter/b/6a8cbe/32.png) [@Bongmaster](https://boards.straightdope.com/u/Bongmaster)\
**Post date:** [November 5, 2002, 4:35pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/6 "2002-11-05T16:35:22Z")

</div>

> [@](#):
>
> \*Originally posted by aeropl \*  
> \*\*You have to pay Google to ask it a question, so I’m being cheap and asking you guys.

Um, you pay to use google?

---

<div class="post-metadata">

**Author:** ![dantheman](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dantheman/32/9421_2.png) [@dantheman](https://boards.straightdope.com/u/dantheman)\
**Post date:** [November 5, 2002, 5:17pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/7 "2002-11-05T17:17:07Z")

</div>

You have to pay to use Google Answers: [Google Answers](https://answers.google.com/answers/main).

Google Answers allows you to ask an expert a specific question, and then they… well, they answer you. 🙂 It appears to be a manual operation, rather than an automated search.

---

<div class="post-metadata">

**Author:** ![aeropl](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@aeropl](https://boards.straightdope.com/u/aeropl)\
**Post date:** [November 5, 2002, 8:19pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/8 "2002-11-05T20:19:28Z")

</div>

dantheman, That’s the service I referred to in a subtly sarcastic way.

---

<div class="post-metadata">

**Author:** ![Cerowyn](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@Cerowyn](https://boards.straightdope.com/u/Cerowyn)\
**Post date:** [November 5, 2002, 8:39pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/9 "2002-11-05T20:39:31Z")

</div>

BTW, if you’re running Windows 2000 or XP, you can run the Indexing Service and get similar performance in searching for documents on your machine.

---

<div class="post-metadata">

**Author:** ![dantheman](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dantheman/32/9421_2.png) [@dantheman](https://boards.straightdope.com/u/dantheman)\
**Post date:** [November 6, 2002, 1:30pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/10 "2002-11-06T13:30:16Z")

</div>

I know, **aeropl**. I was answering **Bongmaster**.

---

<div class="post-metadata">

**Author:** ![Starbury](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Starbury](https://boards.straightdope.com/u/Starbury)\
**Post date:** [November 6, 2002, 5:33pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/11 "2002-11-06T17:33:17Z")

</div>

You might be interested in [this page](http://www.google-watch.org/pagerank.html). It explains Google’s system of PageRankings and the problems associated with it.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [November 6, 2002, 6:04pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/12 "2002-11-06T18:04:39Z")

</div>

Quoth **engineer\_comp\_geek** :

> [@](#):
>
> (for example the ZQ branch probably doesn’t end in any words)

You’d be surprised at [what you can get](http://www.google.com/search?hl=en&ie=ISO-8859-1&q=zq*). I rather doubt that there are any three-letter strings which don’t appear somewhere in Google’s database: There are a lot of TLAs out there, after all.

---

<div class="post-metadata">

**Author:** ![shelbo](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@shelbo](https://boards.straightdope.com/u/shelbo)\
**Post date:** [November 6, 2002, 6:23pm UTC](https://boards.straightdope.com/t/the-wonders-of-google/135312/13 "2002-11-06T18:23:05Z")

</div>

Thanks **Starbury**. That was interesting.
