Re: Querying a database for 50 users' information: 50 queries or a WHERE array?

From: Date: Tue, 13 Sep 2011 19:45:18 +0000
Subject: Re: Querying a database for 50 users' information: 50 queries or a WHERE array?
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-314815@lists.php.net to get a copy of this message
On Tue, Sep 13, 2011 at 21:34, Alex Nikitin <niksoft@gmail.com> wrote: > And this will be faster or at least more efficient with a limit (e.g. limit > 50) this way when you have found the 50 users in the "in" statement, you > don't continue iterating through the rest of your data set... > The number is never exactly 50 but rather some arbitrary large number. But there is no need for LIMIT, that is the purpose of the _INNER_ JOIN. INNER means to only return the matching rows. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com

« previous php.general (#314815) next »