MySQL Forums
Forum List  »  PHP

Retrive result from multiple query dramatically slow
Posted by: aaa bbb
Date: May 12, 2015 06:58AM

Hi,
after run multiple query using mysqli->multi_query()
according to documentation I have to loop on result before
try to run another multi_query().

I do like documentation, but retriving result is dramatically slow.


I have no idea why, so at the end I write in this forum to have an help
from the community.


Documentation says, but this loop take seconds of time .... and it is not useful

if (mysqli_multi_query($link, $query)) {
do {
/* store first result set */
if ($result = mysqli_use_result($link)) {
while ($row = mysqli_fetch_row($result)) {
printf("%s\n", $row[0]);
}
mysqli_free_result($result);
}
/* print divider */
if (mysqli_more_results($link)) {
printf("-----------------\n");
}
} while (mysqli_next_result($link));
}

Options: ReplyQuote


Subject
Written By
Posted
Retrive result from multiple query dramatically slow
May 12, 2015 06:58AM


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.