dongmo3413 2012-07-02 11:26
浏览 13
已采纳

如何优化大型内容网站的网页和数据库

A website which is related to shopping e-commerce. The website having huge number of data to be stored in DB. so far the products table in db is having nearly 18K records with 20 fields. i have created the db structure as follows

 - brands
 - products
 - shopslist
 - shopping_details

The website is having 100+ pages everything related to products and brands.

eg.pages are 
www.example.com/nokia-mobile-phones.php , www.example.com/samsung-mobile-phones.php 
www.example.com/samsung-galaxy-s3-price.php,www.example.com/android-mobile-phones.php

i have written the queries to fetch the product details corresponding to the pages dynamically. This makes my website some what slower in grabbing the data from db ans displaying.

Currently website is having nearly 14k to 15k visits per day. suddenly the website becomes very slow and stops responding for more than 10hrs a day. The technical people on hosting side said the problem is due to more number of requests in a single day and your db occupies 75% of the memory , optimize your site and db for better results . The website is hosted in VPS with better configurations.

Kindly give a solutions for optimizing a website , queries and db.

  • 写回答

3条回答 默认 最新

  • dougan7657 2012-07-02 11:49
    关注
    1. Use Caching Systems

    2. Avoid Resizing Images in HTML, If an image is originally 1280x900px in dimension. (i.e. <img width="400" height="280" src="myimage.jpg" />)

    3. Use External JS and CSS Files

    4. Optimize the Way You Write Code - For example, instead of using <h1><em>Your heading</em></h1>, you can easily use CSS to make your headings italics using the font-style property

    5. Use a Content Delivery Network (CDN)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 求解 yolo算法问题
  • ¥15 虚拟机打包apk出现错误
  • ¥30 最小化遗憾贪心算法上界
  • ¥15 用visual studi code完成html页面
  • ¥15 聚类分析或者python进行数据分析
  • ¥15 三菱伺服电机按启动按钮有使能但不动作
  • ¥15 js,页面2返回页面1时定位进入的设备
  • ¥50 导入文件到网吧的电脑并且在重启之后不会被恢复
  • ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
  • ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝