Welcome, Guest
Username: Password: Remember me

TOPIC: Large surveys - createinsertquery() issue

Large surveys - createinsertquery() issue 2 years 3 months ago #71158

  • maknase
  • maknase's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 1
  • Karma: 0
I'm on 1.91+ and I have an issue with large scale surveys (400 groups, 4 questions each, all mandatory). As at every step (group) the results are saved it takes some time to load the next page. I found out that the function createinsertquery in save.php on line 138 takes most of the time.

So, I thought I reduce the time and save the results only every 20 steps (groups). with this code:
if ($thisstep % 20 == 0) $subquery = createinsertquery();

Works fine until I get to the 20th step. Then it says suddenly that I haven't answered a mandatory question.

Any idea why this happens? ANy other idea how I can avoid limesurvey to save results at every step?
The administrator has disabled public write access.

Re: Large surveys - createinsertquery() issue 2 years 3 months ago #71175

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 81
  • Karma: 36
maknase-

LimeSurvey 1.92 RC1 fixes that problem in two ways:
(1) It only loads the survey definition from the database once at survey start time. 1.91+ would re-load the entire definition on each page.
(2) It has a NavigateForwards() function that checks the validity of each group, and manages skipping of groups if several in a row are irrelevant (have no questions that should be shown). That function pools all of the database update information and generates SQL when it gets to a page that should be shown (or the end of the survey). So, if you skip 20 pages, you'll still only have one database update call.
(3) It also checks all of the mandatory and validation rules. So, if you are using the Navigation Index, and skip back 20 pages, change something, then try to skip to the end, it will stop on the first page that fails a mandatory or validation rule.

1.92 RC1 isn't considered a stable release yet, but you might want to try it to see if it addresses your issue.

/Tom
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.114 seconds
Donation Image