Asma Aripin <[EMAIL PROTECTED]> writes:

> ----------
> I want to select 1 record from 200,000 rows of records. I use this SQL
> statement:
> 
> SELECT password FROM TableUser WHERE username='jack00'
> 
> It takes me about 20 seconds just to view the password.
> 
> Is there any other way to decrease the time? (In about less then 1 second)

Build an index on the username field.  Either re-create the table with
an index on 'username', or else use the SQL command "CREATE INDEX" to
create an index on an already-created table.  Syntax is in the
documentation.

Good luck,

----ScottG.

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