- Posts: 11637
- Thank you received: 2737
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Allow longer answer codes (and question codes, too)
- holch
- Offline
- LimeSurvey Community Team
Less
More
4 years 8 months ago #187039
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Allow longer answer codes (and question codes, too)
1240+ columns can be fine, or they can't. Unfortunately there is no way to say that the limit is exactly X columns, without know the questions, etc. But Joffm gave you a very clear example. But it doesn't mean that 1575 is the limit in all cases.
How will you notice that you run into this limit? I think you will only really know once you activate the survey and then get an error message. Maybe Denis knows more.
How will you notice that you run into this limit? I think you will only really know once you activate the survey and then get an error message. Maybe Denis knows more.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 8 months ago #187119
by jelo
As long as LimeSurvey carries on with the "wrong" database concept (Roadmap states "Refactor answer database to get rid of column limitations"), you will hit the wall with the database depending on your survey design on the range of "never" to "quite often". Even with a "simple" survey design you can hit the database limit. If you think about workarounds for looping and other features, you get to the limit even quicker.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Allow longer answer codes (and question codes, too)
Correct. The amount of questions is often more than it looks. There is a reason why LimeSurvey has questiontypes with answers and sub-questions. Subquestions demand more space. A single answer question has answers. A multiple choice question has subquestions.holch wrote: How will you notice that you run into this limit? I think you will only really know once you activate the survey and then get an error message.
As long as LimeSurvey carries on with the "wrong" database concept (Roadmap states "Refactor answer database to get rid of column limitations"), you will hit the wall with the database depending on your survey design on the range of "never" to "quite often". Even with a "simple" survey design you can hit the database limit. If you think about workarounds for looping and other features, you get to the limit even quicker.
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- oleggorfinkel
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 103
- Thank you received: 2
4 years 8 months ago - 4 years 8 months ago #187121
by oleggorfinkel
Oleg G.
Replied by oleggorfinkel on topic Allow longer answer codes (and question codes, too)
So, what would be the "right" design? Basically, I can only see two viable options here:jelo wrote: As long as LimeSurvey carries on with the "wrong" database concept...
- Seamlessly creating overflow tables when the row size limit is reached.
- Having a single, very simple answer table with one row per answer and the columns being participant-token, survey-id, survey-instance-id, question-id, [subquestion-id] and, finally, the value, which would be just a bit-bucket of a certain length. The value field, of course, would need to be interpreted based on the question type whenever the results are either displayed or exported. This kind of an architecture would clearly be more performance-intensive than the current one, but we are not talking about mega transaction volumes here, so I think it would be doable, and on the positive side, it's a very simple solution, and one that takes care of the row size limit problem once and for all.
Oleg G.
Last edit: 4 years 8 months ago by oleggorfinkel.
The topic has been locked.
- jelo
- Offline
- Platinum Member
Less
More
- Posts: 5033
- Thank you received: 1257
4 years 8 months ago #187152
by jelo
Depending on additional features, you end up with a handful of tables.
To get an impression, take a look at this here:
www.sawtoothsoftware.com/help/lighthouse...d_web_howstored.html
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Replied by jelo on topic Allow longer answer codes (and question codes, too)
The typical design is distributed via different tables with a maptable.oleggorfinkel wrote: So, what would be the "right" design?
Depending on additional features, you end up with a handful of tables.
To get an impression, take a look at this here:
www.sawtoothsoftware.com/help/lighthouse...d_web_howstored.html
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
4 years 8 months ago #187154
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Allow longer answer codes (and question codes, too)
Long answer code :
bugs.limesurvey.org/view.php?id=7593#c52401
@ollehar open a mantis issue about separate database (in some condition)
I don't find it
@ollehar open a mantis issue about separate database (in some condition)
I don't find it
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- oleggorfinkel
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 103
- Thank you received: 2
4 years 8 months ago #187167
by oleggorfinkel
Oleg G.
Replied by oleggorfinkel on topic Allow longer answer codes (and question codes, too)
Yes, that's exactly what I was talking about as option #1 in my previous message.jelo wrote:
The typical design is distributed via different tables with a maptable.oleggorfinkel wrote: So, what would be the "right" design?
Depending on additional features, you end up with a handful of tables.
To get an impression, take a look at this here:
www.sawtoothsoftware.com/help/lighthouse...d_web_howstored.html
Oleg G.
The topic has been locked.
- blocka
- Offline
- Platinum Member
Less
More
- Posts: 409
- Thank you received: 34
4 years 2 months ago #192885
by blocka
Replied by blocka on topic Allow longer answer codes (and question codes, too)
I need to manually override the answer code length this for one of my surveys.
I see the table _answers has the column code varchar(5). I need to change this to varchar(.
When I change it, I see that LS still restricts the length to varchar(5), so I'm guessing somewhere in the LS codebase, the max length of _answers.code is defined?
Can anyone point me to the location where max length of 5 is defined, so I can override it to 8?
I see the table _answers has the column code varchar(5). I need to change this to varchar(.
When I change it, I see that LS still restricts the length to varchar(5), so I'm guessing somewhere in the LS codebase, the max length of _answers.code is defined?
Can anyone point me to the location where max length of 5 is defined, so I can override it to 8?
The topic has been locked.
- blocka
- Offline
- Platinum Member
Less
More
- Posts: 409
- Thank you received: 34
4 years 2 months ago #192890
by blocka
Replied by blocka on topic Allow longer answer codes (and question codes, too)
Digging a bit deeper into this, I've tested with these changes, and it appears to work:
/application/views/admin/survey/Question/subquestionsAndAnswers/_answer_option.twig : ln #53
/application/models/Answer.php : ln #75
/application/views/admin/labels/_labelviewtabcontent_view.php : ln #47
And update database columns:
ALTER TABLE `lime_answers` CHANGE `code` `code` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
ALTER TABLE `lime_labels` CHANGE `code` `code` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
/application/views/admin/survey/Question/subquestionsAndAnswers/_answer_option.twig : ln #53
/application/models/Answer.php : ln #75
/application/views/admin/labels/_labelviewtabcontent_view.php : ln #47
And update database columns:
ALTER TABLE `lime_answers` CHANGE `code` `code` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
ALTER TABLE `lime_labels` CHANGE `code` `code` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '';
The topic has been locked.