View Single Post
Old 11-20-2012, 09:32 PM   PM User | #8
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,195
Thanks: 59
Thanked 3,995 Times in 3,964 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
It's a bit of a let down. The current DB I am working with has only two moderately large tables. One about 12 million records, one about 14.5 million.

Hmmm...Let me try a query on that one with 12 million records.

It's a record of page hits by page name for the last 3 years, roughly.

Let me try counting how many hits a given page got.

Okay, done. MySQL took 10 milliseconds to do that. About 12,000 records out of the 12 million...counted in 0.01 seconds.

In the 14.5 million record table, things are organized by zip code. Selecting a count of all records in a single zip code takes 0.02 seconds. 20 milliseconds.

Or how about this one:
Code:
SELECT COUNT(*) FROM tablename WHERE phone LIKE '360%';
A bit more complex, with the LIKE in there, right?

220 milliseconds.

And remember, MySQL is *NOT* even the most efficient database on the planet...by far! SQL Server and Oracle can run rings around it in many situations.

People constantly amaze me by not realizing just how powerful these query engines are! Hundreds of very very smart programmers have poured their life's work into making these things. THEY ARE FAST! Really.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote