List:General Discussion« Previous MessageNext Message »
From:duo fu Date:August 12 2002 1:58am
Subject:Query problem/mysql
View as plain text  
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 <benjamin-mysql@stripped>
>To: Paul DuBois <paul@stripped>
>CC: Michael Collins <mcollins@stripped>, mysql@stripped
>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, paul@stripped 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.
>
>--
>benjamin-mysql@stripped
>
>---------------------------------------------------------------------
>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 <mysql-thread116822@stripped>
>To unsubscribe, e-mail 
><mysql-unsubscribe-fuduo99=hotmail.com@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

Thread
Query problem/mysqlduo fu12 Aug