Re: ACFinder テスト中

このトピックの投稿一覧へ

なし Re: ACFinder テスト中

msg# 1.7.1
depth:
2
前の投稿 - 次の投稿 | 親投稿 - 子投稿なし | 投稿日時 2011.01.09 03:29
OhYeah!  管理人   投稿数: 983 オンライン
m_kihon テーブルの koka フィールド更新は、下記の方がほんのわずかですが速いですね。
--/d
-- テンポラリ効果テーブル
drop table if exists t_koka;
create temp table t_koka as select
  bango,
  (select kokaid from spec.bunrui where seibun1 = seibun) as koka1,
  (select kokaid from spec.bunrui where seibun2 = seibun) as koka2,
  (select kokaid from spec.bunrui where seibun3 = seibun) as koka3,
  (select kokaid from spec.bunrui where seibun4 = seibun) as koka4,
  (select kokaid from spec.bunrui where seibun5 = seibun) as koka5
from m_kihon;
alter table t_koka add column idkoka integer;
alter table t_koka add column koka varchar;
update t_koka set idkoka = ifnull(koka1, 0) | ifnull(koka2, 0) | ifnull(koka3, 0) | ifnull(koka4, 0) | ifnull(koka5, 0);
update t_koka set idkoka = (select kokaid from spec.koka where koka = '展着') where idkoka = 0;
update t_koka set koka = concat('・',
  (select koka from spec.koka where kokaid = idkoka & 3),
  (select koka from spec.koka where kokaid = idkoka & 4),
  (select koka from spec.koka where kokaid = idkoka & 8),
  (select koka from spec.koka where kokaid = idkoka & 16),
  (select koka from spec.koka where kokaid = idkoka & 32),
  (select koka from spec.koka where kokaid = idkoka & 64),
  (select koka from spec.koka where kokaid = idkoka & 128),
  (select koka from spec.koka where kokaid = idkoka & 256),
  (select koka from spec.koka where kokaid = idkoka & 512),
  (select koka from spec.koka where kokaid = idkoka & 1024),
  (select koka from spec.koka where kokaid = idkoka & 2048),
  (select koka from spec.koka where kokaid = idkoka & 4096),
  (select koka from spec.koka where kokaid = idkoka & 8192),
  (select koka from spec.koka where kokaid = idkoka & 16384),
  (select koka from spec.koka where kokaid = idkoka & 32768)
);
-- m_kihon 更新
update m_kihon set koka = (select koka from t_koka where bango = m_kihon.bango);
drop table if exists t_koka;
投票数:0 平均点:0.00

投稿ツリー

  条件検索へ