Ignore:
Timestamp:
2010/11/09 18:00:25 (16 years ago)
Author:
nanasess
bzr:base-revision:
[email protected]
bzr:committer:
Kentaro Ohkouchi <[email protected]>
bzr:file-ids:

data/Smarty/templates/admin/system/editdb.tpl 19117@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fdata%2FSmarty%2Ftemplates%2Fadmin%2Fsystem%2Feditdb.tpl
data/Smarty/templates/admin/system/subnavi.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fsystem%2Fsubnavi.tpl
data/class/SC_Initial.php 16506@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Initial.php
data/class/SC_Product.php 18277@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2FSC_Product.php
data/class/SC_Query.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_Query.php
data/class/helper/SC_Helper_DB.php 15176@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_DB.php
data/class/helper/SC_Helper_Session.php 15277@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fhelper%2FSC_Helper_Session.php
data/class/pages/LC_Page.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2FLC_Page.php
data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php 17293@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Fclass%2Fpages%2Fadmin%2Forder%2FLC_Page_Admin_Order_ProductSelect.php
data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php 19117@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fdata%2Fclass%2Fpages%2Fadmin%2Fsystem%2FLC_Page_Admin_System_Editdb.php
data/class/pages/products/LC_Page_Products_List.php 15154@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fproducts%2FLC_Page_Products_List.php
data/class_extends/page_extends/admin/system/LC_Page_Admin_System_Editdb_Ex.php 19117@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fdata%2Fclass_extends%2Fpage_extends%2Fadmin%2Fsystem%2FLC_Page_Admin_System_Editdb_Ex.php
html/admin/system/editdb.php 19180@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-D%2Fhtml%2Fadmin%2Fsystem%2Feditdb.php
html/install/sql/column_comment.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcolumn_comment.sql
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql
html/install/sql/drop_table.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fdrop_table.sql
html/install/sql/insert_data.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Finsert_data.sql
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
[email protected]
bzr:revno:
2392
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:timestamp:
2010-11-09 18:00:16.530999899 +0900
bzr:user-agent:
bzr2.2.0+bzr-svn1.0.3
svn:original-date:
2010-11-09T09:00:16.531000Z
Message:

source:branches/camp/camp-2_5-D のマージ

  • sfCategory_Countの高速化(規格のデータベースを木構造に #781)
  • IN句が長くなり正常に動かない問題を修正(規格のデータベースを木構造に #781)
  • インデックス管理機能(#848)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/SC_Query.php

    r18820 r19662  
    6565            $this->conn = MDB2::singleton($dsn, $options); 
    6666        } 
    67  
    6867        if (!PEAR::isError($this->conn)) { 
    6968            $this->conn->setCharset(CHAR_CODE); 
    7069            $this->conn->setFetchMode(MDB2_FETCHMODE_ASSOC); 
    7170        } 
    72  
    7371        $this->dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    7472        $this->force_run = $force_run; 
     
    733731        return $this->conn->listTableIndexes($table); 
    734732    } 
    735  
     733     
     734    /** 
     735     * テーブルにインデックスを付与する 
     736     * 
     737     * @param string $table テーブル名 
     738     * @param string $name インデックス名 
     739     * @param array $definition フィールド名など 通常のフィールド指定時は、$definition=array('fields' => array('フィールド名' => array())); 
     740     */ 
     741    function createIndex($table, $name, $definition) { 
     742        $this->conn->loadModule('Manager'); 
     743        return $this->conn->createIndex($table, $name, $definition); 
     744    } 
     745 
     746    /** 
     747     * テーブルにインデックスを破棄する 
     748     * 
     749     * @param string $table テーブル名 
     750     * @param string $name インデックス名 
     751     */ 
     752    function dropIndex($table, $name) { 
     753        $this->conn->loadModule('Manager'); 
     754        return $this->conn->dropIndex($table, $name); 
     755    } 
     756     
    736757    /** 
    737758     * 値を適切にクォートする. 
     
    777798     */ 
    778799    function execute(&$sth, $arrVal = array()) { 
     800        $timeStart = SC_Utils_Ex::sfMicrotimeFloat(); 
    779801        $affected =& $sth->execute($arrVal); 
     802 
     803        // 一定以上時間かかったSQLの場合、ログ出力する。 
     804        if(defined('SQL_QUERY_LOG_MODE') && SQL_QUERY_LOG_MODE == true) { 
     805            $timeEnd = SC_Utils_Ex::sfMicrotimeFloat();; 
     806            $timeExecTime = $timeEnd - $timeStart; 
     807            if(defined('SQL_QUERY_LOG_MIN_EXEC_TIME') && $timeExecTime >= (float)SQL_QUERY_LOG_MIN_EXEC_TIME) { 
     808                //$logMsg = sprintf("SQL_LOG [%.2fsec]\n%s", $timeExecTime, $this->getLastQuery(false)); 
     809                $logMsg = sprintf("SQL_LOG [%.2fsec]\n%s", $timeExecTime, $sth->query); 
     810                GC_Utils_Ex::gfPrintLog($logMsg); 
     811            } 
     812        } 
     813 
    780814        if (PEAR::isError($affected)) { 
    781815            $sql = isset($sth->query) ? $sth->query : ''; 
Note: See TracChangeset for help on using the changeset viewer.