On Aug 4, 2009, at 7:18 PM, 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 MySQ
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 t
Just shooting from the hip, I would say the faster method would be to create
the 5 different mysql queries. The amount of time taken up by retrieving
500 articles of either blob or text can add up to a significant amount of
time, whereas 5 queries that average 10 results per query would result in
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