On 9/7/06, prasad.ramisetti@stripped wrote:
> I need to know the number of rows that a query will return before
> actually executing the query. So I am sending select count(*) before
> sending select *. Actually I need to reject queries if the number of
> records that it will return is huge, to avoid my server running out of
> memory. My application has a huge database of around 10 millions.
> The selects with INNODB falls drastically as the size of records grow. A
> select count(*) that takes 4 secs with 1 million records takes 40 secs
> with 3 million records.
Just read the fine manual, everything is explained there:
If you want more information on the fundamentals behind
multiversioning I would recommend reading chapter 5 of "Concurrency
Control and Recovery in Database Systems"
http://research.microsoft.com/pubs/ccontrol/ If you want more
information about the InnoDB specific implementation details there is
always the source.