MySQL memory usage
Posted: Thu Jan 04, 2007 12:41 pm
feyd | Please use
Queries do use a lot of memory and can cause the server to crash:-(
Are there other ways to get/insert/update data from a database?
Any other tips to reduce memory usage are welcome;-)
Thanks,
Dirk
feyd | Please use
Code: Select all
,Code: Select all
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:Code: Select all
$query1 = "SELECT * FROM $table WHERE field = '$var' ORDER BY f1, f2 LIMIT 0, $n";
$sql1 = mysql_query($query1, $handledb);
while($row1 = mysql_fetch_array($sql1)){
...
}
mysql_free_result($sql1);Queries do use a lot of memory and can cause the server to crash:-(
Are there other ways to get/insert/update data from a database?
Any other tips to reduce memory usage are welcome;-)
Thanks,
Dirk
feyd | Please use
Code: Select all
,Code: Select all
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]