ログインしてさらにmixiを楽しもう

コメントを投稿して情報交換!
更新通知を受け取って、最新情報をゲット!

koshoten.netコミュの表示速度の高速化

  • mixiチェック
  • このエントリーをはてなブックマークに追加
表示速度を改善させる方法を見つけましたのでトピックを作成しました。

ある程度の商品数を超えると表示速度が遅くなる事例が多いようですが、これはデータベースにindexを追加する事で解決するようです。
自サイトでは対策前と後では劇的とも言える表示速度の改善に成功しました。

以下対策。(某掲示板より転載)

●Index化 の例
*遅いと感じたときだけやること
*index化しても変わらない時は、削除すること
削除例 :
ALTER TABLE products DROP INDEX idx_products_status;
・新着商品が遅い
ALTER TABLE products ADD INDEX idx_products_status (products_status);
・特価商品が遅い
ALTER TABLE specials ADD INDEX idx_products_id (products_id);
・カテゴリーが遅い
alter table categories add index idx_parent_id(parent_id);
alter table categories add index idx_sort_order(sort_order);
alter table categories add index idx_categories_id(categories_id);
・ログインが遅い
alter table customers add index idx_customers_email_address(customers_email_address);
・申込み処理が遅い(オーダーが一杯溜まった)
alter table orders add index idx_customers_id(customers_id);
・商品表示が遅い(categories_description周辺)
alter table categories_description add index idx_categories_id(categories_id);
・個別商品の表示が遅い
alter table products add index idx_products_model(products_model);
alter table products add index idx_products_price(products_price);
alter table products add index idx_products_date_available(products_date_available);
alter table products add index idx_manufacturers_id(manufacturers_id);
・個別商品の商品表示が遅い(オプションが一杯あって)
alter table products_options add index idx_products_options_name(products_options_name);
alter table products_attributes add index idx_products_id(products_id);
alter table products_attributes add index idx_options_id(options_id);

以上です。
他には「カテゴリー内の商品数を非表示にする」という対策もありますが、以上の対策を講じるとそれ以上の効果が見られました。
既知の対策かもしれませんが、何かのお役に立てれば。

コメント(0)

mixiユーザー
ログインしてコメントしよう!

koshoten.net 更新情報

koshoten.netのメンバーはこんなコミュニティにも参加しています

星印の数は、共通して参加しているメンバーが多いほど増えます。

人気コミュニティランキング