Re: query executes very slow in a table with 2m records

2010-07-13 Thread mos
At 10:36 AM 7/13/2010, Rob Wultsch wrote: On Tue, Jul 13, 2010 at 8:22 AM, mos wrote: > At 09:29 AM 7/13/2010, æ ŽÃ¥Â¾  wrote: >> >> Hello, >> >> There are more than 2m records in the table -- fxrate. >> I create patitions, indexes, but it still takes me about 7 minutes to >> execute the follo

Re: query executes very slow in a table with 2m records

2010-07-13 Thread Rob Wultsch
On Tue, Jul 13, 2010 at 8:22 AM, mos wrote: > At 09:29 AM 7/13/2010, æ Žå¾  wrote: >> >> Hello, >> >> There are more than 2m records in the table -- fxrate. >> I create patitions, indexes, but it still takes me about 7 minutes to >> execute the following query >> SELECT COUNT(*) >> FROM fxrate >>

RE: query executes very slow in a table with 2m records

2010-07-13 Thread Jerry Schwartz
--Original Message- >From: ?? [mailto:dllizh...@gmail.com] >Sent: Tuesday, July 13, 2010 10:30 AM >To: mysql@lists.mysql.com >Subject: query executes very slow in a table with 2m records > >Hello, > >There are more than 2m records in the table -- fxrate. >I create pati

Re: query executes very slow in a table with 2m records

2010-07-13 Thread mos
At 09:29 AM 7/13/2010, 李征 wrote: Hello, There are more than 2m records in the table -- fxrate. I create patitions, indexes, but it still takes me about 7 minutes to execute the following query SELECT COUNT(*) FROM fxrate WHERE MONTH(quoteDate) = 6 AND quoteHourMinSec BETWEEN "06:00:00" AND

query executes very slow in a table with 2m records

2010-07-13 Thread 李征
Hello, There are more than 2m records in the table -- fxrate. I create patitions, indexes, but it still takes me about 7 minutes to execute the following query SELECT COUNT(*) FROM fxrate WHERE MONTH(quoteDate) = 6 AND quoteHourMinSec BETWEEN "06:00:00" AND "19:00:00" result: 647337 How can I i