Re: 500 records (articles) - SELECT ALL or USE WHERE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Zvarík wrote:
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.

For none of these situations you've mentioned do you need the text for the articles. Don't select it if you don't need it.

Which of these 2 options is better for performance?

Database. Not only for performance but for memory (imagine 100,000 articles).

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux