Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m searching for a survey plugin and found yours. Must admit, I haven’t tried it since I’m planning a survey that will ideally get 500-1000 responses so haven’t wanted to jump on the boat here given the data loss issues. I suspect that your issue will be related to how much data you can stuff into a single option field. You could run into a similar problem with your move to store the survey data as a blob in post meta data.

    There’s also some risk of data loss of individual responses with your present method if several people are attempting to respond at the same time. You could have a couple threads running at the same time, both issue get_options, update the value and the last writer will win.

    In my mind, this use case screams for a new table in the DB to manage the response content. It would make the survey completion more scalable as more users respond as adding individual responses will require less data to move around. You could also devise a method of storing individual responses as post meta data to avoid a new table. Whichever you choose, I strongly recommend a solution that treats each response as a unique record in the DB so your plugin scales better.

    Plugin Contributor Toby

    (@tobyhawkins)

    If you read the first link in Will’s post, that’s exactly what he’s planning.

    It does seem that’s the general direction and I misread one particular phrase in his post. I initially had the impression that he was planning to simply store all responses for a particular survey (post) in one post_meta blob.

    From a database performance perspective, I suspect (but can’t say for certain) that it will be better to create a new table to hold survey responses. Still go with a post per survey, however use a table definition with a tuple like (response_id, post_id, response). Each post would have multiple such records where response is the data for a particular respondent.

    The first link in Will’s post returns an error:

    Not Found

    The requested URL /to-the-users-of-the-awesome-surveys-plugin/ was not found on this server.

    Apache/2.4.7 (Ubuntu) Server at https://www.willthewebmechanic.com Port 80

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Data Loss’ is closed to new replies.