Hi, friends:
I have just created a small web site with php/mysql. I do a query into one
of my tables whose .MYI=338K and .MYD=7.6M. I could only retrieve some
part of the data and then the browser just died there.
My query is select * from Forces. The primary key is combination of
several fields. Table Force has 132 fields. Its size reaches 20 MB.
How can I solve the problem? Will adding an index help? I am just intending
to print out the whole table.
Could you please help me out?
Thank you very much!
Duo
From: Benjamin Pflugmann [EMAIL PROTECTED]
To: Paul DuBois [EMAIL PROTECTED]
CC: Michael Collins [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Need reversible encryption as string
Date: Sun, 11 Aug 2002 19:51:57 +0200
Hi.
On Sun 2002-08-11 at 12:07:47 -0500, [EMAIL PROTECTED] wrote:
At 9:25 -0700 8/11/02, Michael Collins wrote:
[...]
SELECT * FROM MYDB
WHERE EmailAddress=$EmailEntered AND
DECODE(LoginPassword,'MySalt')=$PasswordEntered
If you write the query like that, yes, it will use a complete scan.
I beg to differ. If there is an index on EmailAddress it will be used
and only all entries with the same email address (which should be one
or only one) will be scanned.
But you could also use
... AND LoginPassword = ENCODE($PasswordEntered,'MySalt')
But that's a good idea anyhow.
Bye,
Benjamin.
--
[EMAIL PROTECTED]
-
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
_
Chat with friends online, try MSN Messenger: http://messenger.msn.com
-
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