500 records (articles) - SELECT ALL or USE WHERE

From: Date: Tue, 04 Aug 2009 23:18:30 +0000
Subject: 500 records (articles) - SELECT ALL or USE WHERE
Groups: php.db 
Request: Send a blank email to php-db+get-46403@lists.php.net to get a copy of this message
I need to do about 5 queries: 1) pick the top visited articles 2) pick the recent articles (limit 10) 3) pick the most commented articles etc. Now, I have 2 choices: 1) SELECT ALL records and use PHP for conditions 2) do 5 queries on MySQL --- Imagine it has 500 long text articles. Which of these 2 options is better for performance? Thanks, Martin

« previous php.db (#46403) next »