Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
バックグラウンドで mysql データベースを使用して、yii を新しく「インストール」しました。
アプリからデータベース接続を取得したい場合:
$connection = Yii::app()->db;
これには約 1 秒かかります。
高速化するコツはありますか?
デバッグして、データベースへの接続に使用された時間を見つけます。
WebGrindを使用してテストします。
私の場合、約10ミリ秒かかることをテストしました。