and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
Is there a way to find out how much memory an sql query uses?
example php code:
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
mysql_query() copies the whole resultset into the memory space of the php process at once. If the result contains many records you might want to consider using mysql_unbuffered_query
I've also found the following. If you have root access to your server you can try the command: cat /proc/user_beancounters
This gives you some list with lots of things I don't understand but I do know that if the column failcnt is giving non zero values, it's not good.
Who knows where to find some more info about this?