Examveda

Which of these has a lower memory requirements?
mysql_use_result(), mysql_store_result()

A. mysql_use_result()

B. mysql_store_result()

C. same

D. machine dependent

Answer: Option A

Solution (By Examveda Team)

This question is about two MySQL functions: mysql_use_result() and mysql_store_result(). Both functions are used to retrieve results from a query, but they differ in how they handle the data.

* mysql_use_result() fetches data row by row on demand. It doesn't store the entire result set in memory.
* mysql_store_result() retrieves the entire result set and stores it in memory for later use.

So, which one has lower memory requirements?

Since mysql_use_result() only retrieves data when needed, it uses less memory compared to mysql_store_result(), which stores the entire result set.

Therefore, the answer is Option A: mysql_use_result()

This Question Belongs to MySQL >> MySQL Miscellaneous

Join The Discussion

Related Questions on MySQL Miscellaneous