i am creating a news site. i am adding new news in database and it must
be visible to user at top. and then second latest news and so on.
i am displaying 15 news on each page and then put a link for next 15
news on page.
my site is accessed by millions of people everyday. so for each when he
want to see news he click on news link and in my php program query is
run in database. so my database access became very slow because if one
million people clicks on news link, the database will be accessed and
query will be run one million times.
so i want to fast the news access. i thought that i create html page on
harddrive when i add new news in database. so when user clicks on news
hyperlink it checks whether the html file displaying first 15 news
already exist. if yes then it display that html file and if not exist
then php script query database for first 15 latest news.
is there any other optimized way available to achieve this than the one
i planned?????
thxs for your reply in advance.....
be visible to user at top. and then second latest news and so on.
i am displaying 15 news on each page and then put a link for next 15
news on page.
my site is accessed by millions of people everyday. so for each when he
want to see news he click on news link and in my php program query is
run in database. so my database access became very slow because if one
million people clicks on news link, the database will be accessed and
query will be run one million times.
so i want to fast the news access. i thought that i create html page on
harddrive when i add new news in database. so when user clicks on news
hyperlink it checks whether the html file displaying first 15 news
already exist. if yes then it display that html file and if not exist
then php script query database for first 15 latest news.
is there any other optimized way available to achieve this than the one
i planned?????
thxs for your reply in advance.....
Comment