It's just that the number of rows in a table is stored directly in the
.MYD file (I believe) so a query like "select count(*) from table" will
just return that value, rather than counting all the rows. It's not
that the functions are "built-in", rather they're *optimized* - a
totally different thing.
Dean.
> -----Original Message-----
> From: JamesD [mailto:jim@stripped]
> Sent: Saturday, 21 December 2002 7:33 pm
> To: mysql@stripped
> Subject: RE: Can MySQL handle 120 million records?
>
> Jeremy,
>
> if i run the command
>
> show tables; on some database
> it returns
>
> "5 rows in set (0.02 sec)"
>
> and if, on the same database i run
> the command
>
> select count(*) from 'table';
> it returns
>
> +---------+
> | count(*)|
> +---------+
> | 47226322|
> +---------+
> 1 row in set (0.00 sec)
>
> now, i believe its reasonable to assume
> a CPU must spend more time to count 47 million records,
> than to count 5 tables. This is why I believe
> that many common selects are built-in to mysql in the code
> somewhere. make sense? Its a good idea actually, that building
> in commonly run selects when the process is idling and stuffing
> results into variables that can be called in an instant, saves
> us all time and money...
>
> Jim
>
>
> -----Original Message-----
> From: Jeremy Zawodny [mailto:Jeremy@stripped]
> Sent: Friday, December 20, 2002 3:28 PM
> To: JamesD
> Cc: mysql@stripped
> Subject: Re: Can MySQL handle 120 million records?
>
>
> On Wed, Dec 18, 2002 at 08:05:46PM -0800, JamesD wrote:
> >
> > i like mySQL, but it has a long way to go to gain the level of
> > 'confidence' that oracle, db2 or mssql or sybase have when it comes
> > to frontline mission critical stuff.
>
> Can you explain why?
>
> > I think it will in time...thats why i stick with it. besides,
> > confidence is often just a synonym for 'knowledge'
>
> Really? I tend to see it more like confidence builds with experience
> (and therefore time). You don't need to know a lot about to become
> confident in its operation. Many of us don't *really* understand how
> gravity works, but we're quite confident in it.
>
> > select count(*) from x (0.00 seconds)
> >
> > if you dig into the source, you will probably find this common
> > select is built in and running all the time,
> >
> > and we are all just getting a pre-filled variable
> > returned from the method " select count(*) from (x) "
>
> Please find it. I'll bet you money that it's not.
>
> > I hope someone can prove me wrong...
>
> I think the burden of proof is on you.
>
> Jeremy
> --
> Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
> <Jeremy@stripped> | http://jeremy.zawodny.com/
>
> MySQL 3.23.51: up 5 days, processed 219,909,773 queries (441/sec. avg)
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread128129@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-
> jim=workinout.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread128152@stripped>
> To unsubscribe, e-mail <mysql-unsubscribe-
> deanie=bigpond.net.au@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| Thread |
|---|
| • Can MySQL handle 120 million records? | B.G. Mahesh | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Qunfeng Dong | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • RE: Can MySQL handle 120 million records? | Adam Nelson | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 18 Dec |
| • RE: Can MySQL handle 120 million records? | Joe Stump | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Gerald Jensen | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Aaron Clausen | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Paul DuBois | 18 Dec |
| • Database type question | Richard E. Perlotto II | 19 Dec |
| • Re: Database type question | Iikka Meriläinen | 19 Dec |
| • Re[2]: Can MySQL handle 120 million records? | Dyego Souza do Carmo | 19 Dec |
| • RE: Can MySQL handle 120 million records? | Wayne Lewis | 18 Dec |
| • Excluding records? | Eric Anderson | 19 Dec |
| • Re: Excluding records? | Adolfo Bello | 20 Dec |
| • Re: Re[2]: Can MySQL handle 120 million records? | Harald Fuchs | 19 Dec |
| • Re: Re[2]: Can MySQL handle 120 million records? | Paul DuBois | 19 Dec |
| • Re: Re[2]: Can MySQL handle 120 million records? | Paul DuBois | 19 Dec |
| • Re: Can MySQL handle 120 million records? | Muruganandam | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael Bacarella | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • RE: Can MySQL handle 120 million records? | Joe Stump | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 18 Dec |
| • Can I build a web page to extract data? | Gary Hostetler | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Csongor Fagyal | 19 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jocelyn Fournier | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jocelyn Fournier | 18 Dec |
| • Re: Can MySQL handle 120 million records? | W. D. | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Jocelyn Fournier | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Csongor Fagyal | 18 Dec |
| • Re: Can MySQL handle 120 million records? | W. D. | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Csongor Fagyal | 18 Dec |
| • Re: Can MySQL handle 120 million records? | B.G. Mahesh | 18 Dec |
| • Re: Can MySQL handle 120 million records? | David T-G | 18 Dec |
| • RE: Can MySQL handle 120 million records? | JamesD | 18 Dec |
| • Re: Can MySQL handle 120 million records? | David T-G | 18 Dec |
| • RE: Can MySQL handle 120 million records? | Peter Vertes | 18 Dec |
| • RE: Can MySQL handle 120 million records? - Impressive! How do you guys do that? | Qunfeng Dong | 18 Dec |
| • Re: Can MySQL handle 120 million records? - Impressive! How doyou guys do that? | R. Hannes Niedner | 18 Dec |
| • Re: Can MySQL handle 120 million records? - Impressive! How do youguys do that? | Michael T. Babcock | 18 Dec |
| • Re: Can MySQL handle 120 million records? - Ok, If you guys really can handle tens of millions records, you have to help me to enjoy MySQL too :-) | Qunfeng Dong | 18 Dec |
| • Re: Can MySQL handle 120 million records? - Ok, If you guys really can handle tens of millions records, you have to help me to enjoy MySQL too :-) | Qunfeng Dong | 18 Dec |
| • Re: Can MySQL handle 120 million records? - Ok, If you guys really can handle tens of millions records, you have to help me to enjoy MySQL too :-) | Jocelyn Fournier | 19 Dec |
| • Thanks! Re: Can MySQL handle 120 million records? - Ok, If you guys really can handle tens of millions records, you have to help me to enjoy MySQL too... | Qunfeng Dong | 20 Dec |
| • Re: Can MySQL handle 120 million records? - Ok, If you guys really can handle tens of millions records, you have to help me to enjoy MySQL too :-) | Ryan Fox | 19 Dec |
| • Re: Can MySQL handle 120 million records? - Ok, If you guys really can handle tens of millions records, you have to help me to enjoy MySQL too :-) | Brent Baisley | 19 Dec |
| • RE: Can MySQL handle 120 million records? | JamesD | 19 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 21 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 21 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 23 Dec |
| • Re: Can MySQL handle 120 million records? | Michael She | 21 Dec |
| • RE: Can MySQL handle 120 million records? | JamesD | 21 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 22 Dec |
| • Re: Can MySQL handle 120 million records? | Michael T. Babcock | 23 Dec |
| • Re: Can MySQL handle 120 million records? | Jeremy Zawodny | 23 Dec |
| • DELETE with no WHERE clause | Gordon | 23 Dec |
| • Re: DELETE with no WHERE clause | Dennis Salguero | 24 Dec |
| • re: DELETE with no WHERE clause | Victoria Reznichenko | 24 Dec |
| • RE: Can MySQL handle 120 million records? | JamesD | 21 Dec |
| • RE: Can MySQL handle 120 million records? | Dean Harding | 21 Dec |
| • RE: Can MySQL handle 120 million records? | JamesD | 21 Dec |
| • RE: Can MySQL handle 120 million records? | David Brodbeck | 18 Dec |
| • RE: Can MySQL handle 120 million records? | Greg_Cope | 18 Dec |
| • Re: Can MySQL handle 120 million records? | Paul DuBois | 18 Dec |
| • RE: Can MySQL handle 120 million records? | RBRoa | 19 Dec |
| • RE: Can MySQL handle 120 million records? | Dana Diederich | 19 Dec |
| • RE: Can MySQL handle 120 million records? | John Griffin | 19 Dec |
| • Re: Excluding records? | King_Henree@yahoo.com | 20 Dec |