sql request limit

Status
Not open for further replies.

kloofi

New Member
Messages
1
Reaction score
0
Points
0
hello,
I use a script of a social network that uses PHP / Mysql, can i see in x10 hosting an error Mysql because my site uses too many sql queries? (have you fixed a limit for the sql request ?) is the case with some free web hosting (idoo.com) when i tried my script i had a message error: the user (sql_user) had exeded the limit of sql request.
sorry for my bad English i am french
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
What are you wondering about the limit of? The number of connections? The number of simultaneous queries? The size of data sent in a query? The size of the results? You can get the current values of various MySQL server variables, which is where limits would be set, by using a "SHOW VARIABLES" statement. To limit the result to just one or a few variables, use "SHOW VARIABLES LIKE 'pattern'" (examples: SHOW VARIABLES LIKE 'max%', SHOW VARIABLES LIKE '%limit').

The following are the current values of a few relevant server variables on lotus. The links are to the English documentation. The same information is in French, but there's no way of linking directly to the variable descriptions in French.


The variable sql_select_limit imposes a limit on the number of rows returned by a SELECT, but it isn't set on lotus.

You can run a SHOW VARIABLES query in phpMyAdmin or using the following fragment of PHP.

PHP:
$db = new PDO ('mysql:host=localhost', $dbUser, $dbPassword);
$rslt = $db->query("SHOW VARIABLES LIKE '%_limit'");

echo '<dl>';
while ($row = $rslt->fetch(PDO::FETCH_NUM)) {
	echo "<dt>$row[0]</dt><dd>$row[1]</dd>";
}
echo '</dl>';
 
Status
Not open for further replies.
Top