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

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,187
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
One more example.

Again, from the table with 14.5 million records.

select count(*) from sometable where zip = '98296' AND name like '%clearview%';

Matching on zip code and then, using LIKE, on the name.

Ready?

TEN MILLISECONDS.

Or how about actually *getting* the records, not just a count?

select name, phone from tablename where zip = '98296' AND name like '%clearview%';

STILL TEN MILLISECONDS.

0.01 second.

You could make ONE HUNDRED such queries in ONE SECOND.

Do you think maybe, just maybe, MySQL could handle a table with 20,000 records?
__________________
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