开发者

mysql good way of programming

i have the video gallery in my database, which has over 200 000 videos. in my h开发者_运维知识库ome page in the site i show exactly some videos, which must satisfy to some criteria. and so, what is the question. is it a good way to sort videos every time the home page opene, or i must save the sort results somewhere in the database, and refresh them only if something change. i think it can save me a lot of time. what you think about it. thanks in advance.


You should let the database sort the data!!! If the table is set up correctly it shouldn't be much overhead!!! You can also look into query caching which can do some of what you are thinking of doing for you!!! I was very excited to answer this question!!!


If the sort operation is expensive, do it at intervals or on specific triggers, otherwise do it dynamically


Sort videos every time the page opened. Database were invented intentionally to do such things.


do any optimizations steps only when you have troubles with performance. until the troubles appeared - just hold breath and monitor performance statistics.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜