many thanks brothers

Now, my query fastest again with limit 1, because query count(*) just result
1 row

=-hery-=

----- Original Message -----
From: "BD" <[EMAIL PROTECTED]>
To: "Hery Yulianto" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 10:34 PM
Subject: Re: How to index Optimization on 20 million record


> Hery,
>           You need to get some idea of how many records are being counted.
> What I suggest is to put a Limit on your select statement and gradually
> increase it.
>
> For example
> select count(*) from TABLE_1 where FIELD_1 = "XXX_CC" limit 10;
>
> If this takes too long, then you know right away there is something wrong
> with the index.
> If it is fast enough, then increase it to "Limit 1000" and test the time.
> Then bump it up to 5000, 10000 etc. until you get an idea of how many rows
> it is trying to count. Perhaps it there are 1 million rows with FIELD_1 =
> "XXX_CC"?
>
> Brent
>



---------------------------------------------------------------------
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