Ujwal Abhishek
Ujwal Abhishek

Reputation: 338

monitor queries in codeigniter application

i have been working on CakePhp so far recently switched to CodeIgniter. I have a CodIgniter project which has come for performance optmization. I need to check the queries which are taking time and enhance it. I want to monitor the time taken by the queries residing in the application. I am looking for something familiar to what we have in CakePhp which we use to see each query taking how much time in debug mode. I want something like that for codeigniter. Please help.

Upvotes: 0

Views: 493

Answers (2)

ABorty
ABorty

Reputation: 2522

place the code in your construct function in the controller

$this->output->enable_profiler(true);

it will give you all the query time.

Upvotes: 2

Nil'z
Nil'z

Reputation: 7475

Write the following line in the controller construct function:

$this->output->enable_profiler(true);

Upvotes: 2

Related Questions