Sunday, October 4, 2015

Profiling PHP – MSSQL Execution Time

Membatasi waktu eksekusi script php dapat menjadi tolok ukur dalam membangun aplikasi web dari sistem yang efektif dan efisien. Namun terkadang kita dihadapkan dengan kondisi dimana data yang kita retrieve dari database server memerlukan waktu yang cukup panjang dan memaksa kita untuk memperpanjang waktu eksekusi baik script php maupun database query timeout agar tidak terjadi error. Setting keduanya dapat kita temukan pada file php.ini di web server kita.

Pada environment linux, file php.ini biasanya dapat kita temukan pada
path /etc/php5/apache2/php.ini, sementara di windows dengan paket installer xampp biasanya diletakkan pada folder: c:/xampp/php/php.ini.

Lama waktu eksekusi script php dapat kita tentukan dengan memasukkan nilai pada baris seperti berikut pada file php.ini:


; Maximum execution time of each script, in seconds 
; http://php.net/max-execution-time 
; Note: This directive is hardcoded to 0 for the CLI SAPI 
max_execution_time = 60 

Angka tersebut merupakan dalam satuan detik. Untuk pengaturan database, masing-masing database server memiliki bagian setting tersendiri di file konfigurasi php. Untuk SQL Server, dapat kita temukan pada bagian


[MSSQL] 
… 
; Query timeout Mssql.timeout = 90

untuk database server yang lain saya pikir tidak jauh berbeda. Semoga bermanfaat.

2 comments:

  1. Ocean provides guests a variety of|quite so much of|a wide range of} accommodations, from Contemporary King 1xbet korea and Queen rooms, to exquisite Studio and One Bedroom suites. Indulge in tantalizing cuisine cooked to perfection by award-winning chefs. Check your balances, available provides, tier status and more whenever you login. Get in on the thrill with thrilling perks, benefits and the ultimate word|the ultimate word} VIP treatment whenever you join.

    ReplyDelete
  2. Information 온라인카지노 Security -- We utilize encryption/security software program to safeguard the confidentiality of non-public information we collect from unauthorized entry or disclosure and accidental loss, alteration or destruction. Evaluation of Information Protection Practices -- Periodically, our operations and business practices are reviewed for compliance with group policies and procedures governing the security, confidentiality and quality of our information. Employee Access, Training and Expectations -- Our group values, ethical requirements, policies and practices are committed to the protection of user information.

    ReplyDelete