On Wed, 2001-10-31 at 08:52, kmlau wrote:
> hi all,
> 
>    Let me to introduce somethings first, we use mysql for a logging system
> and take about max 150 000 records hourly. And we need to take a period of
> data for analyzing.

I haven't followed the thread but do you use INSERT DELAYED already?
These are nonblobking INSERT commands which give you freedon to run
SELECT's.

> >Well, how many records are in the table?  How many would be returned by the
> >query you present?
> 
> The previous table  is my trail one ! . Actually, my db (tlcounter200109)
> contains 56463703 records And for that sql statement : select * from
> tlcounter200109 where timerecord = 0109051200. The returned records have
> 86564 rows and execution time is 6 min 1.15 sec ( Expected time is within 1
> min)
> 
> >Is the SQL you show the FULL sql?
> 
> Yes , full sql is that select * from tlcounter200109 where timerecord =
> 0109051200
> 
> >What is the output of the EXPLAIN SELECT....
> 
> explain select * from tlcounter200109 where timerecord = 0109051200;
> +----------------------
> +-------+---------------------+----------+-----------+---------+------------
> --+-------------------+
> | table           | type  | possible_keys   |key     | key_len | ref    |
> rows      | Extra        |
> +-----------------------+------
> +----------------------+---------+-----------+---------+--------------+-----
> --------------+
> | tlcounter200109   | ALL  | timerecordindex  | NULL   |  NULL  | NULL  |
> 56463703 |    where used |
> +-----------------------+-------+---------------------+-------- -+----------
> -+---------+--------------+---- --------------+


Something is really wrong. Can you rebuild your indexes with command
"REPAIR TABLE tlcounter200109" ? What is your MySQL version? It should
use index.

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Tonu Samuel <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Security Administrator
/_/  /_/\_, /___/\___\_\___/   Räpina, Estonia
       <___/   www.mysql.com


---------------------------------------------------------------------
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 <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to