[PHP-users 29320] Re: クラスメソッドからの戻りが遅い

Ryuichi g-stuff @ bk.iij4u.or.jp
2006年 5月 31日 (水) 11:52:31 JST


こんにちは。前野です。

> $obj = $p->your_query_class();
> とした場合と
> $obj =& $p->your_query_class();
> とした場合で、時間は変化しますか?
>
時間の変化はありませんでした。
上記の変更を行ったところ、2回目のクエリ発行後のfetchを行う、
データベース用のクラスのメソッドをCallする所で20秒程とまってしまいした。

> 一度目のQueryを発行してからデータ取得を始めるまでの時間
> データを配列に入れ終わる時間
> には、どのぐらいかかっているのでしょう。
>
function call before     [2006/05/31 11:41:32] <-関数呼び出し直前
function exec1 start     [2006/05/31 11:41:32] <-Query発行(1)
function exec1 end       [2006/05/31 11:41:33]
postgres fetchdata start [2006/05/31 11:41:33]
postgres fetchdata end   [2006/05/31 11:41:33]
function arr set start   [2006/05/31 11:41:33]
function arr set end     [2006/05/31 11:41:33]
function exec2 start     [2006/05/31 11:41:33] <-Query発行(2)
function exec2 end       [2006/05/31 11:41:33]
function fetch start     [2006/05/31 11:41:33] <-fetch関数呼び出し
postgres fetchdata start [2006/05/31 11:41:33] <--fetch関数内
postgres fetchdata end   [2006/05/31 11:41:33]
function fetch end       [2006/05/31 11:41:33]
function arr2 set start  [2006/05/31 11:41:33]
function arr2 set end    [2006/05/31 11:41:33]
function function fin    [2006/05/31 11:41:33] <-関数終了直前(20秒タイムラグ)
function call after      [2006/05/31 11:41:53] <-関数呼出し後

function call before     [2006/05/31 11:30:01] <-関数呼び出し直前
function exec1 start     [2006/05/31 11:30:01] <-Query発行(1)
function exec1 end       [2006/05/31 11:30:01]
postgres fetchdata start [2006/05/31 11:30:01]
postgres fetchdata end   [2006/05/31 11:30:02]
function arr set start   [2006/05/31 11:30:02]
function arr set end     [2006/05/31 11:30:02]
function exec2 start     [2006/05/31 11:30:02] <-Query発行(2)
function exec2 end       [2006/05/31 11:30:02]
function fetch start     [2006/05/31 11:30:02] <-fetch関数呼び出し(20秒のタイムラグ)
postgres fetchdata start [2006/05/31 11:30:22] <-fetch関数内
postgres fetchdata end   [2006/05/31 11:30:22]
function fetch end       [2006/05/31 11:30:22]
function arr2 set start  [2006/05/31 11:30:22]
function arr2 set end    [2006/05/31 11:30:22]
function function fin    [2006/05/31 11:30:22] <-関数終了直前
function call after      [2006/05/31 11:30:22] <-関数呼出し後

-- 
Ryuichi<g-stuff @ bk.iij4u.or.jp>


PHP-users メーリングリストの案内