Logo F2FInterview

Codelgnitor Interview Questions

Q   |   QA

You can use $result->free_result() to free the results, but sometimes this isn’t the root cause of excessive memory usage. Also, some calls (such as INSERTs) do not return a database object, so you can’t free() them. With very many INSERTs this can really bite you, as CI defaults to saving all your queries.

An undocumented CI feature is available to turn this off:

$this->db->save_queries = false;

There may be performance (caching) issues associated with disabling this across the board - ie. caution and experimentation is indicated. 

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: