GSoC/GCI Archive
Google Code-in 2010 LimeSurvey

Function to calculate the db limit for the maximum number of questions

completed by: Kshitij

mentors: Carsten Schmitz, Machaven


When a survey in LimeSurvey is activated an exactly fitting database table is create to hold the response data.

However most databases have limits on the number of available fields a table can have. For example, if the InnoDB engine on mysql is used this limit is 1000 fields, with the mySQL ISAM engine it is much more complicated though.

See the documentation at for how it is caculated.

With very big surveys it is possible to hit these maximum limits. However an administratrator does not know that until they try to activate the survey.


Idea task

Create a function in LimeSurvey that calculates depending on the DB engine used and the actualy questions in a survey how much 'space' is left for more questions. You could show this information in the general survey quick-overview (after a survey is selected). This could either a progressbar (jQuery UI?) or some numbers. If the maximum limit of questions is exceeded make it display an alert.

Implement this for mySQL InnoDB & myISAM, also check on the documented limits for mssql and postgres of possible.



  • Use limesurvey_dev branch
  • Code, code, code ;)
  • If you have questions don't hesitate to ask.