----- Original Message ----- 
From: "svens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 25, 2002 3:45 AM
Subject: can anybody tell me!!!


> Hello
> 
> I have server Intel P-4 2,8Ghz 2Gb RAM
> 
> so
> and 
> I hve INNODB 
> and table with 145000 records
> and when Im trying to query
> select * from bla where date like "20021025%" order by date
> DESC limit 20 searhc time is 2,4 to 3,2 seconds
> what a hell is going on?
>  
> What can I do to fast up these quesry requests ??


Create an index on the field for the WHERE clause; like this (in Perl):

$sth = $dbh -> prepare ("ALTER table bla ADD INDEX(date)");
die $dbh->errstr if (not defined ($sth -> execute));


> I cant imagine if my table will contain some of 960000
> rows  it will search my query a hundred years

Creating an index should shave off a few years. :)

- Mark

        System Administrator Asarian-host.org

---
"If you were supposed to understand it,
we wouldn't call it code." - FedEx


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