Hello all,
I am having this kind of problem:
I have a table which have 7000 rows, and those rows are articles. This means, each row contains a title, content, keywords, description, and many different statistics. My problem is that, in the main page (homepage) I must query six times to this table, because I have to display top 3 most readed articles (order by content.views), last added and last updated (content.addedtime and content.updatedtime), and so on for some other fields.
Doing all this takes a lot of time, and soon, articles will be up to 10000 and more.
What do you suggest me?
Maybe fetching all table to a multidimensional array? How to work with it later?
What about array_multisort()?
p.s. I don't want someone to do my work, I just want suggestions.
Thanks!
I am having this kind of problem:
I have a table which have 7000 rows, and those rows are articles. This means, each row contains a title, content, keywords, description, and many different statistics. My problem is that, in the main page (homepage) I must query six times to this table, because I have to display top 3 most readed articles (order by content.views), last added and last updated (content.addedtime and content.updatedtime), and so on for some other fields.
Doing all this takes a lot of time, and soon, articles will be up to 10000 and more.
What do you suggest me?
Maybe fetching all table to a multidimensional array? How to work with it later?
What about array_multisort()?
p.s. I don't want someone to do my work, I just want suggestions.
Thanks!
Comment