Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between QUESTIONS and Query

Tags:

mysql

when i check status from MySQL console it shows 104 questions, ... and in the MySQL general log it shows 18 Queries !

Q1 -> what is the difference between Question and Query ?
Q2 -> For a standard site what should be an ideal limit for questions and queries per page [in forum/social networking] ?

like image 497
Sourav Avatar asked Apr 28 '11 05:04

Sourav


1 Answers

As per the manual:

Queries. The number of statements executed by the server. This variable includes statements executed within stored programs, unlike the Questions variable. It does not count COM_PING or COM_STATISTICS commands. This variable was added in MySQL 5.0.76.

Questions. The number of statements executed by the server. As of MySQL 5.0.72, this includes only statements sent to the server by clients and no longer includes statements executed within stored programs, unlike the Queries variable. This variable does not count COM_PING, COM_STATISTICS, COM_STMT_PREPARE, COM_STMT_CLOSE, or COM_STMT_RESET commands.

like image 57
Andriy M Avatar answered Nov 09 '22 14:11

Andriy M