Try Explain command before execute something
Please google how to use index
- Original Message -
From: "hewei"
To: "Ananda Kumar"
Cc: mysql@lists.mysql.com
Sent: Thursday, June 17, 2010 5:54:23 PM
Subject: Re: why the sql so slowly?
you want to select all
you want to select all rows from the table?
===> YES
you want to select all rows from the table
On Thu, Jun 17, 2010 at 2:05 PM, hewei wrote:
> 1.How many records are there in this table.
> ==>6000 rows.
>
> 2.What is the select statement ur running.
> ==>
> ---
>
> I need to select the table 'table_code' per minute,and
1.How many records are there in this table.
==>6000 rows.
2.What is the select statement ur running.
==>
---
I need to select the table 'table_code' per minute,and the sql is like :
select code from table_code;
---
How many records are there in this table.
What is the select statement ur running.
regards
anandkl
On Thu, Jun 17, 2010 at 10:05 AM, hewei wrote:
> now , I need to select a table per minute.
> 1.
> the table struture:
> -
> CREATE
now , I need to select a table per minute.
1.
the table struture:
-
CREATE TABLE `table_code` (
`timestamp` timestamp NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
`code` decimal(5,0) NOT NULL default '0',
PRIMARY K