problem with mysql_free_result take a lot of time
Posted by: nkutuzov nkutuzov
Date: April 05, 2010 09:44AM

Hello!

I need to execute sql query, which returns 10 millions of rows. But I don't need to read all 10 millions, maybe only first 100 records.

To read rows I use mysql_use_result and mysql_fetch_field_direct functions.

mysql_query, mysql_use_result and mysql_fetch_field_direct work very fast.


But if I don't read all 10 millions of record mysql_free_result take a lot of time. And at this time tables impacted in select request are locked.

How to free mysql result fast without tables lock and don't read all records?

Maybe someone had such problem?

Thank you!



Edited 1 time(s). Last edit at 04/05/2010 09:47AM by nkutuzov nkutuzov.

Options: ReplyQuote


Subject
Views
Written By
Posted
problem with mysql_free_result take a lot of time
3531
April 05, 2010 09:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.